Force targetTabId to be null if not a number (#678)
This commit is contained in:
parent
71b97c2019
commit
e12f59f87d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user