FIX: Ensure that categories array is not undefined (#25141)
With lazy_load_categories enabled, the categories array can be undefined because it is not loaded yet (it is populated on demand).
This commit is contained in:
parent
0fe11ef337
commit
62e570afe2
|
@ -377,7 +377,7 @@ Category.reopenClass({
|
|||
const reduce = (values) =>
|
||||
values.flatMap((c) => [c, reduce(children.get(c.id) || [])]).flat();
|
||||
|
||||
return reduce(children.get(-1));
|
||||
return reduce(children.get(-1) || []);
|
||||
},
|
||||
|
||||
isUncategorized(categoryId) {
|
||||
|
|
Loading…
Reference in New Issue