]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix dropdown Private items with empty set 3189/head
authorshamoon <4887959+shamoon@users.noreply.github.com>
Wed, 26 Apr 2023 05:06:16 +0000 (22:06 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Wed, 26 Apr 2023 05:06:16 +0000 (22:06 -0700)
src-ui/src/app/components/common/input/select/select.component.ts

index 3d81f6f49c2f62124c8afccb4862819f6ef69353..73f2a3a8d86446cd34e504c42415fa42b986410d 100644 (file)
@@ -43,8 +43,8 @@ export class SelectComponent extends AbstractInputComponent<number> {
   }
 
   checkForPrivateItems(value: any) {
-    if (Array.isArray(value) && value.length > 0) {
-      value.forEach((id) => this.checkForPrivateItem(id))
+    if (Array.isArray(value)) {
+      if (value.length > 0) value.forEach((id) => this.checkForPrivateItem(id))
     } else {
       this.checkForPrivateItem(value)
     }