From f1b59257b4c2cefe816b5052c427cd4af2fcbf18 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 3 Jan 2021 01:19:48 -0600 Subject: [PATCH] fix: name -> type --- packages/socket/src/client/index.js | 2 +- packages/socket/src/socket.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/socket/src/client/index.js b/packages/socket/src/client/index.js index 2592377..42a028b 100644 --- a/packages/socket/src/client/index.js +++ b/packages/socket/src/client/index.js @@ -5,7 +5,7 @@ export default { '@latus/http/client/up': (latus) => { const socket = new SocketClient(latus); socket.on('packet', (packet) => { - if ('Refresh' === packet.constructor.name) { + if ('Refresh' === packet.constructor.type) { window.location.reload(); } }); diff --git a/packages/socket/src/socket.js b/packages/socket/src/socket.js index 2000320..d2af5a8 100644 --- a/packages/socket/src/socket.js +++ b/packages/socket/src/socket.js @@ -67,7 +67,7 @@ export default class ServerSocket extends decorate(Class) { static send(latus, socket, packetOrDehydrated, method) { const packet = normalize(latus, packetOrDehydrated); - debug('sending packet %s(%o)', packet.constructor.name, packet.data); + debug('sending packet %s(%o)', packet.constructor.type, packet.data); const {id} = packet.constructor; return socket[method](id, packet.data); }