diff --git a/packages/transformers/webextension/src/WebExtensionTransformer.js b/packages/transformers/webextension/src/WebExtensionTransformer.js index ac12fbb8669..51cbe6a0ef7 100644 --- a/packages/transformers/webextension/src/WebExtensionTransformer.js +++ b/packages/transformers/webextension/src/WebExtensionTransformer.js @@ -343,7 +343,7 @@ async function collectDependencies( program.permissions.push('scripting'); } const hostPerms = [ - ...new Set(program.content_scripts.flatMap(sc => sc.matches)), + ...new Set(program.content_scripts?.flatMap(sc => sc.matches)), ]; if (isMV2) program.permissions = program.permissions.concat(hostPerms); else {