aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 31191612..ccd828f6 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -654,7 +654,10 @@ export class Backend {
const tab = sender.tab;
const tabId = tab ? tab.id : void 0;
const frameId = sender.frameId;
- return Promise.resolve({tabId, frameId});
+ return {
+ tabId: typeof tabId === 'number' ? tabId : null,
+ frameId: typeof frameId === 'number' ? frameId : null
+ };
}
/** @type {import('api').ApiHandler<'injectStylesheet'>} */