]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
fix error case
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 8 Apr 2022 06:06:46 +0000 (23:06 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 8 Apr 2022 06:06:46 +0000 (23:06 -0700)
[ci skip]

src-ui/src/app/services/document-list-view.service.ts

index e67ceda4b134629f1646533cd87555bb6c8d985d..b0d246a329b6e6f7d2b84600669e610141e8c88f 100644 (file)
@@ -161,7 +161,10 @@ export class DocumentListViewService {
             this.reload()
           } else {
             let errorMessage
-            if (Object.keys(error.error).length > 0) {
+            if (
+              typeof error.error !== 'string' &&
+              Object.keys(error.error).length > 0
+            ) {
               // e.g. { archive_serial_number: Array<string> }
               errorMessage = Object.keys(error.error)
                 .map((fieldName) => {