mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Correct runtime issue(s) with saveEditNext
This commit is contained in:
@@ -63,10 +63,10 @@ export class OpenDocumentsService {
|
||||
else this.dirtyDocuments.delete(documentId)
|
||||
}
|
||||
|
||||
closeDocument(doc: PaperlessDocument, force: boolean = false): Observable<boolean> {
|
||||
closeDocument(doc: PaperlessDocument): Observable<boolean> {
|
||||
let index = this.openDocuments.findIndex(d => d.id == doc.id)
|
||||
if (index == -1) return of(true);
|
||||
if (force || !this.dirtyDocuments.has(doc.id)) {
|
||||
if (!this.dirtyDocuments.has(doc.id)) {
|
||||
this.openDocuments.splice(index, 1)
|
||||
this.save()
|
||||
return of(true)
|
||||
|
Reference in New Issue
Block a user