diff --git a/packages/browser/src/client/public/error-catcher.js b/packages/browser/src/client/public/error-catcher.js index 081b9024f..50e498905 100644 --- a/packages/browser/src/client/public/error-catcher.js +++ b/packages/browser/src/client/public/error-catcher.js @@ -1,4 +1,4 @@ -import { channel, client } from '@vitest/browser/client' +import { client } from '@vitest/browser/client' function serializeError(unhandledError) { const state = globalThis.__vitest_worker__ @@ -69,19 +69,6 @@ async function reportUnexpectedError( await client.waitForConnection().then(() => { return client.rpc.onUnhandledError(processedError, type) }).catch(console.error) - const state = __vitest_browser_runner__ - - if (state.type === 'orchestrator') { - return - } - - if (!state.runTests || !__vitest_worker__.current) { - channel.postMessage({ - // TODO: what to do in this case now? - event: 'response:???', - iframeId: state.iframeId, - }) - } } registerUnexpectedErrors()