Skip to content

Commit

Permalink
fix: check manifest content scripts existence before iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
barantaran committed Mar 3, 2024
1 parent a4f2e66 commit 9adf81e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/plugins/make-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function makeManifest(config?: { getCacheInvalidationKey?: () =>
fs.mkdirSync(to);
}
const manifestPath = resolve(to, 'manifest.json');
if (cacheKey) {
if (cacheKey && manifest.content_scripts) {
// Naming change for cache invalidation
manifest.content_scripts.forEach(script => {
script.css &&= script.css.map(css => css.replace('<KEY>', cacheKey));
Expand Down

0 comments on commit 9adf81e

Please sign in to comment.