Skip to content

Commit 2f37b7e

Browse files
committed
fix: properly handle encoding
1 parent 591b84b commit 2f37b7e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class CoCreateFileSystem {
8888
organization_id
8989
}
9090

91+
if (pathname.includes('1240-1240'))
92+
console.log('test')
9193
let file
9294
if (pathname.startsWith('/dist') || pathname.startsWith('/admin') || ['/403.html', '/404.html', '/offline.html', '/manifest.webmanifest', '/service-worker.js'].includes(pathname))
9395
file = await getDefaultFile(pathname)
@@ -156,11 +158,10 @@ class CoCreateFileSystem {
156158
} else if (Buffer.isBuffer(src)) {
157159
console.log('buffer')
158160
return
159-
}
160-
161-
if (typeof src === 'object') {
161+
} else if (typeof src === 'object') {
162162
src = JSON.stringify(src);
163163
}
164+
164165
crud.wsManager.emit("setBandwidth", {
165166
type: 'out',
166167
data: src,

0 commit comments

Comments
 (0)