This commit is contained in:
2025-10-13 22:13:19 +08:00
parent 78cc6dcf55
commit 5603d09e80
10 changed files with 73 additions and 1265 deletions

View File

@@ -1,4 +1,6 @@
const isBrowser = process?.env?.BROWSER === 'true' || (typeof window !== 'undefined' && typeof window.document !== 'undefined');
const isBrowser = (typeof process === 'undefined') ||
(typeof window !== 'undefined' && typeof window.document !== 'undefined') ||
(typeof process !== 'undefined' && process?.env?.BROWSER === 'true');
const chantHttpToWs = (url: string) => {
if (url.startsWith('http://')) {
return url.replace('http://', 'ws://');