Skip to content

Commit

Permalink
Poll userId before fetching buckets list
Browse files Browse the repository at this point in the history
Quick fix for race condition between getUserId and GET /bucket
  • Loading branch information
norrisng-bc committed Dec 27, 2023
1 parent 9c587e5 commit 8cc496a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/components/bucket/BucketList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ const closeBucketConfig = () => {
};
onMounted(async () => {
while (!getUserId.value) {
await new Promise((r) => {
setTimeout(r, 500);
});
}
await bucketStore.fetchBuckets({ userId: getUserId.value, objectPerms: true });
});
</script>
Expand Down

0 comments on commit 8cc496a

Please sign in to comment.