DEV: Do lazy_load_categories check inside asyncFindByIds (#25600)
This way, we can use asyncFindByIds indiscriminately.
This commit is contained in:
parent
8058fd5b80
commit
57c53b0ead
|
@ -484,6 +484,10 @@ Category.reopenClass({
|
|||
async asyncFindByIds(ids = []) {
|
||||
ids = ids.map((x) => parseInt(x, 10));
|
||||
|
||||
if (!Site.current().lazy_load_categories) {
|
||||
return this.findByIds(ids);
|
||||
}
|
||||
|
||||
const result = await categoryMultiCache.fetch(ids);
|
||||
if (categoryMultiCache.hadTooManyCalls()) {
|
||||
warn(
|
||||
|
|
Loading…
Reference in New Issue