fix(writeapi): tests

v1.18.x
Julian Lam 4 years ago
parent 8ecef7b891
commit b8703ba9f6

@ -260,8 +260,10 @@ Sockets.reqFromSocket = function (socket, payload, event) {
};
Sockets.warnDeprecated = (socket, replacement) => {
socket.emit('event:deprecated_call', {
eventName: socket.previousEvents[socket.previousEvents.length - 1],
replacement: replacement,
});
if (socket.previousEvents) {
socket.emit('event:deprecated_call', {
eventName: socket.previousEvents[socket.previousEvents.length - 1],
replacement: replacement,
});
}
};

Loading…
Cancel
Save