fix: crash when closing tab (fixes HFE-146)

This commit is contained in:
Andrew Bastin
2023-08-22 01:02:38 +05:30
parent cb8678f07f
commit 6efae3a395

View File

@@ -215,13 +215,13 @@ const sortTabs = (e: { oldIndex: number; newIndex: number }) => {
}
const removeTab = (tabID: string) => {
const tab = getTabRef(tabID)
const tabState = getTabRef(tabID).value
if (tab.value.document.isDirty) {
if (tabState.document.isDirty) {
confirmingCloseForTabID.value = tabID
} else {
closeTab(tab.value.id)
inspectionService.deleteTabInspectorResult(tab.value.id)
closeTab(tabState.id)
inspectionService.deleteTabInspectorResult(tabState.id)
}
}