查询自定义题库时, groups增加判断参数长度

This commit is contained in:
zhl 2021-05-31 19:42:15 +08:00
parent 6963e7e626
commit 708d8da054

View File

@ -94,7 +94,7 @@ export class ShopPuzzleClass extends BaseModule {
if (sub_tag) { if (sub_tag) {
opt.sub_tag = sub_tag opt.sub_tag = sub_tag
} }
if (groups) { if (groups && groups.length > 0) {
Object.assign(opt, { groups: { $in: groups } }) Object.assign(opt, { groups: { $in: groups } })
} }
if (quality != undefined) { if (quality != undefined) {