fix(linux): guard WebSocket.prototype assignment — read-only on WebKitGTK
This commit is contained in:
+2
-1
@@ -79,7 +79,8 @@ if (isTauri) {
|
|||||||
|
|
||||||
return ws;
|
return ws;
|
||||||
} as unknown as typeof WebSocket;
|
} as unknown as typeof WebSocket;
|
||||||
window.WebSocket.prototype = OriginalWebSocket.prototype;
|
// ponytail: WebKitGTK may have read-only prototype — guard against throw
|
||||||
|
try { window.WebSocket.prototype = OriginalWebSocket.prototype; } catch { /* readonly, fine */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
|
|||||||
Reference in New Issue
Block a user