fix: name -> type
This commit is contained in:
parent
70b04f5228
commit
f1b59257b4
|
@ -5,7 +5,7 @@ export default {
|
||||||
'@latus/http/client/up': (latus) => {
|
'@latus/http/client/up': (latus) => {
|
||||||
const socket = new SocketClient(latus);
|
const socket = new SocketClient(latus);
|
||||||
socket.on('packet', (packet) => {
|
socket.on('packet', (packet) => {
|
||||||
if ('Refresh' === packet.constructor.name) {
|
if ('Refresh' === packet.constructor.type) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default class ServerSocket extends decorate(Class) {
|
||||||
|
|
||||||
static send(latus, socket, packetOrDehydrated, method) {
|
static send(latus, socket, packetOrDehydrated, method) {
|
||||||
const packet = normalize(latus, packetOrDehydrated);
|
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;
|
const {id} = packet.constructor;
|
||||||
return socket[method](id, packet.data);
|
return socket[method](id, packet.data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user