mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-26 01:38:36 +00:00
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
1 changed files with 6 additions and 1 deletions
|
@ -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