From f8e7ea6812308ac477dbb677bb9791aec5896eac Mon Sep 17 00:00:00 2001 From: davibaltar Date: Tue, 15 Jun 2021 08:17:43 -0300 Subject: [PATCH] Bugfix in ManagerEvent function. (#61) --- lib/ami.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ami.js b/lib/ami.js index 1cb9284..ab6b5f6 100644 --- a/lib/ami.js +++ b/lib/ami.js @@ -175,7 +175,7 @@ function ManagerReader(context, data) { function ManagerEvent(context, event) { var emits = []; - if (event.response && event.actionid) { + if (event.response && event.actionid && typeof event.response == "string") { // This is the response to an Action emits.push(this.emit.bind(this, event.actionid, (event.response.toLowerCase() == 'error') ? event : undefined, event)); emits.push(this.emit.bind(this, 'response', event));