Skip to content

Commit 68657ee

Browse files
authored
chore: merge pull request #6 from RostyslavNihrutsa/develop
Fixing checking for Firefox compatibility
2 parents 5bb989c + 4a1c250 commit 68657ee

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/InjectScriptV3.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ export default class extends AbstractInjectScript {
3838

3939
// Firefox does not support `documentIds` in the target
4040
// getBrowserInfo is only available in firefox
41-
// @ts-expect-error
42-
const isFirefox = !!browser().runtime.getBrowserInfo;
41+
let isFirefox = false;
42+
try {
43+
// @ts-expect-error
44+
isFirefox = !!browser().runtime.getBrowserInfo;
45+
} catch (_e) {}
4346

4447
if (!isFirefox) {
4548
const documentIds = this.documentIds;

0 commit comments

Comments
 (0)