Skip to content

Commit

Permalink
merge: #2760
Browse files Browse the repository at this point in the history
2760: fix(web): not found race opening func r=paulocsanz a=paulocsanz



Co-authored-by: Paulo Cabral <[email protected]>
  • Loading branch information
si-bors-ng[bot] and paulocsanz authored Sep 19, 2023
2 parents ef78c5c + 0350611 commit 2b51ad1
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions app/web/src/components/AssetEditorTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,20 @@ const onTabClose = (funcId: string) => {
}
};
watch(
[() => assetStore.selectedAssetId, () => assetStore.selectedFuncId],
() => {
if (assetStore.selectedAssetId && !assetStore.selectedFuncId) {
tabGroupRef.value?.selectTab("asset");
} else if (assetStore.selectedAssetId && assetStore.selectedFuncId) {
tabGroupRef.value?.selectTab(assetStore.selectedFuncId);
}
},
const loadFuncDetailsReqStatus = funcStore.getRequestStatus(
"FETCH_FUNC_DETAILS",
assetStore.urlSelectedFuncId,
);
watch([() => assetStore.selectedFuncId, loadFuncDetailsReqStatus], () => {
if (
assetStore.selectedAssetId &&
!assetStore.selectedFuncId &&
loadFuncDetailsReqStatus.value.isSuccess
) {
tabGroupRef.value?.selectTab("asset");
} else if (assetStore.selectedAssetId && assetStore.selectedFuncId) {
tabGroupRef.value?.selectTab(assetStore.selectedFuncId);
}
});
</script>

0 comments on commit 2b51ad1

Please sign in to comment.