fix: name -> type

This commit is contained in:
cha0s 2021-01-03 01:19:48 -06:00
parent 70b04f5228
commit f1b59257b4
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}
});

View File

@ -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);
}