fix: EventSource undefined in Renderer/Worker (#44475)

This commit is contained in:
Shelley Vohr
2024-10-31 20:24:44 +01:00
committed by GitHub
parent 8be4ae4bab
commit 15151c6853
6 changed files with 52 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ wrapFsWithAsar(require('fs'));
// See ElectronRendererClient::DidCreateScriptContext.
if ((globalThis as any).blinkfetch) {
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers'];
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers', 'EventSource'];
for (const key of keys) {
(globalThis as any)[key] = (globalThis as any)[`blink${key}`];
}