mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Do lazy_load_categories check inside asyncFindByIds (#25600)
This way, we can use asyncFindByIds indiscriminately.
This commit is contained in:
committed by
GitHub
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(
|
||||
|
||||
Reference in New Issue
Block a user