diff --git a/src/preview-demo/install.ts b/src/preview-demo/install.ts index a5677e8f..5369c387 100644 --- a/src/preview-demo/install.ts +++ b/src/preview-demo/install.ts @@ -98,7 +98,7 @@ export const installDemo = (win: Window & typeof globalThis = window) => { } win.WebSocket = GuardedSocket; - const realOpen = win.XMLHttpRequest.prototype.open; + const { open: realOpen } = win.XMLHttpRequest.prototype; win.XMLHttpRequest.prototype.open = function open( this: XMLHttpRequest, method: string,