Skip to content

Commit d7887a0

Browse files
committed
Switched server to JSON
1 parent 36fd419 commit d7887a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const sendActionToSocket =
9191
return
9292
}
9393

94-
const data = serializeAction(action)
94+
const data = JSON.stringify(action)
9595

9696
const { action: actionName, ...actionArgs } = action
9797

@@ -151,7 +151,7 @@ const server = createServer((socket) => {
151151
for (const msg of messages) {
152152
if (!msg) return
153153
try {
154-
const message: ActionClientToServer | ActionUtility = stringToJson(msg)
154+
const message: ActionClientToServer | ActionUtility = JSON.parse(msg)
155155
const { action, ...actionArgs } = message
156156

157157
if (action !== 'keepAlive' && action !== 'keepAliveAck') {

0 commit comments

Comments
 (0)