summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-07-19 12:26:57 -0400
committerGitHub <noreply@github.com>2020-07-19 12:26:57 -0400
commite12f59f87d6d39f1a1ed5969471f4c1e6e386505 (patch)
treef1b507a08271e3a29ce4fb73bb28147749da68f5
parent71b97c20199e628618bed456e886a5ae7d9beb08 (diff)
Force targetTabId to be null if not a number (#678)
-rw-r--r--ext/mixed/js/comm.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/mixed/js/comm.js b/ext/mixed/js/comm.js
index 1264a33e..27cb0c34 100644
--- a/ext/mixed/js/comm.js
+++ b/ext/mixed/js/comm.js
@@ -221,6 +221,7 @@ class CrossFrameAPI {
}
async invokeTab(targetTabId, targetFrameId, action, params={}) {
+ if (typeof targetTabId !== 'number') { targetTabId = null; }
const commPort = this._getOrCreateCommPort(targetTabId, targetFrameId);
return await commPort.invoke(action, params, this._ackTimeout, this._responseTimeout);
}