Skip to content

Commit eeb3ba3

Browse files
authored
Don't crash if WebExt has no content_scripts (#9341)
1 parent 406650e commit eeb3ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/transformers/webextension/src/WebExtensionTransformer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ async function collectDependencies(
343343
program.permissions.push('scripting');
344344
}
345345
const hostPerms = [
346-
...new Set(program.content_scripts.flatMap(sc => sc.matches)),
346+
...new Set(program.content_scripts?.flatMap(sc => sc.matches)),
347347
];
348348
if (isMV2) program.permissions = program.permissions.concat(hostPerms);
349349
else {

0 commit comments

Comments
 (0)