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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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}`];
}