fix(front): don't return promise if result is not finished loading for tags

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-09-05 15:55:13 +02:00
parent 31b2d065a9
commit 8c14ba441c
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -11,7 +11,12 @@ export function fetchTags(text: string): Promise<ITag[]> {
})
);
onResult(({ data }) => resolve(data.tags));
onResult((result) => {
if (result.loading) {
return;
}
return resolve(result.data.tags);
});
onError((error) => reject(error));
});