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:
parent
31b2d065a9
commit
8c14ba441c
|
@ -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));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue