mirror of
https://github.com/flarum/framework.git
synced 2025-03-22 21:15:16 +08:00
fix: ts error causing build to fail (#3956)
This commit is contained in:
parent
01598555a9
commit
f793e5b8f8
@ -21,9 +21,10 @@ export default class TagListState {
|
||||
async query(includes: string[] = []): Promise<Tag[]> {
|
||||
this.loadedIncludes ??= new Set();
|
||||
|
||||
return app.store.find<Tag[]>('tags', { include: includes.join(',') }).then((val: Tag) => {
|
||||
return app.store.find<Tag[]>('tags', { include: includes.join(',') }).then((val: Tag | Tag[]) => {
|
||||
const tags = Array.isArray(val) ? val : [val];
|
||||
includes.forEach((include) => this.loadedIncludes!.add(include));
|
||||
return val;
|
||||
return tags;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user