From 044103c1604b33bb05e613228d03596c93f7d0e6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sun, 22 Oct 2023 10:12:54 +0200 Subject: [PATCH] Add callback call check --- lib/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/events.js b/lib/events.js index 3cfb90c..fcce4f4 100644 --- a/lib/events.js +++ b/lib/events.js @@ -305,7 +305,7 @@ module.exports = function(Cam) { this.removeAllListeners('event'); // We can subscribe again only if there is no 'event' listener var data = linerase(res).unsubscribeResponse; } - if (callback) { + if (callback && callback.call) { callback.call(this, err, data, xml); } }.bind(this));