From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 26 Apr 2023 05:06:16 +0000 (-0700) Subject: Fix dropdown Private items with empty set X-Git-Tag: v1.14.1~1^2~9^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3189%2Fhead;p=thirdparty%2Fpaperless-ngx.git Fix dropdown Private items with empty set --- diff --git a/src-ui/src/app/components/common/input/select/select.component.ts b/src-ui/src/app/components/common/input/select/select.component.ts index 3d81f6f49c..73f2a3a8d8 100644 --- a/src-ui/src/app/components/common/input/select/select.component.ts +++ b/src-ui/src/app/components/common/input/select/select.component.ts @@ -43,8 +43,8 @@ export class SelectComponent extends AbstractInputComponent { } 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) }