ソースを参照

Merge branch 'imprv/user-group-listing-api' into imprv/user-group-create-update-parent

Taichi Masuyama 4 年 前
コミット
ad6ce97612
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 } });