do not fail on closing target

This commit is contained in:
Tommy D. Rossi
2025-11-24 19:41:06 +01:00
parent 393f3b2d6d
commit f22cdbb4ad
+2 -1
View File
@@ -445,7 +445,8 @@ export class RelayConnection {
case 'Target.closeTarget': {
if (!targetTab || !targetTab.debuggee.tabId) {
throw new Error(`Target not found: ${msg.params.params?.targetId}`)
logger.log(`Target not found: ${msg.params.params?.targetId}`)
return { success: false } satisfies Protocol.Target.CloseTargetResponse
}
await chrome.tabs.remove(targetTab.debuggee.tabId!)
return { success: true } satisfies Protocol.Target.CloseTargetResponse