Dont allow separator at the end of document parts list
This commit is contained in:
1 parent
c5ae3377bd
commit
971392345b
1 file changed
+3
-4
@@ -28,10 +28,9 @@ export class SplitMergeService {
|
||||
removeDocument(document: PaperlessDocument, atIndex?: number) {
|
||||
if (!atIndex) atIndex = this.documents.indexOf(document)
|
||||
this.documents.splice(atIndex, 1)
|
||||
}
|
||||
|
||||
reduceDocumentsTo(size: number) {
|
||||
if (this.documents.length > size) this.documents.length = size
|
||||
if (this.documents.length && (this.documents[this.documents.length - 1] as PaperlessDocument).is_separator) {
|
||||
this.documents.pop()
|
||||
}
|
||||
}
|
||||
|
||||
getDocuments() {
|
||||
|
||||
Reference in new issue
Block a user