Skip to content

Commit f1f6407

Browse files
committed
fix: temporarily handle sending messages that dont have modules
1 parent 221375e commit f1f6407

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,12 @@ class SocketServer extends EventEmitter {
432432
if (authorized.authorized)
433433
data = authorized.authorized
434434

435+
// TODO: handle non module cases where send is required from messages
435436
let moduleName = data.method.split('.')[0]
436437
if (['storage', 'database', 'array', 'index', 'object'].includes(moduleName))
437438
this.emit(data.method, data);
439+
else if (data.method === 'crdt' || data.method === 'cursor')
440+
this.send(data);
438441
else
439442
this.emit(moduleName, data);
440443
}

0 commit comments

Comments
 (0)