From f793e5b8f8b0bf2ea5842d8b1d2f7ef1fa32a146 Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Tue, 9 Jan 2024 17:07:38 +0000 Subject: [PATCH] fix: ts error causing build to fail (#3956) --- extensions/tags/js/src/common/states/TagListState.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/tags/js/src/common/states/TagListState.ts b/extensions/tags/js/src/common/states/TagListState.ts index 06661a4c1..0b70a8ba2 100644 --- a/extensions/tags/js/src/common/states/TagListState.ts +++ b/extensions/tags/js/src/common/states/TagListState.ts @@ -21,9 +21,10 @@ export default class TagListState { async query(includes: string[] = []): Promise { this.loadedIncludes ??= new Set(); - return app.store.find('tags', { include: includes.join(',') }).then((val: Tag) => { + return app.store.find('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; }); } }