From e12f59f87d6d39f1a1ed5969471f4c1e6e386505 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 19 Jul 2020 12:26:57 -0400 Subject: [PATCH] Force targetTabId to be null if not a number (#678) --- ext/mixed/js/comm.js | 1 + 1 file changed, 1 insertion(+) 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); }