diff --git a/src/socket/socketuser.js b/src/socket/socketuser.js index 28efb8b..b63392d 100644 --- a/src/socket/socketuser.js +++ b/src/socket/socketuser.js @@ -174,7 +174,9 @@ export class SocketUser { data.objectType, data.filter ); - callback({ success: true }); + if (typeof callback === 'function') { + callback({ success: true }); + } } async handleSubscribeToObjectUpdateEvent(data, callback) { @@ -182,7 +184,9 @@ export class SocketUser { data._id, data.objectType ); - callback(result); + if (typeof callback === 'function') { + callback(result); + } } async handleSubscribeToObjectEventEvent(data) {