fix: ts error causing build to fail (#3956)

This commit is contained in:
IanM 2024-01-09 17:07:38 +00:00 committed by GitHub
parent 01598555a9
commit f793e5b8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
});
}
}