Taichi Masuyama 4 лет назад
Родитель
Сommit
6426bed56e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/server/models/user-group.js

+ 2 - 2
packages/app/src/server/models/user-group.js

@@ -79,8 +79,8 @@ class UserGroup {
   }
 
   static async findChildUserGroupsByParentIds(parentIds, includeGrandChildren = false) {
-    if (parentIds == null) {
-      throw Error('parentIds must not be null.');
+    if (!Array.isArray(parentIds)) {
+      throw Error('parentIds must be an array.');
     }
 
     const childUserGroups = await this.find({ parent: { $in: parentIds } });