Skip to content

Commit 0333ce5

Browse files
committed
chore: Fix type error
1 parent 47df623 commit 0333ce5

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

packages/wxt/src/virtual/utils/reload-content-scripts.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,22 @@ export async function reloadManifestContentScriptMv3(
3737

3838
if (existing) {
3939
logger.debug('Updating content script', existing);
40-
await browser.scripting.updateContentScripts([{ ...contentScript, id }]);
40+
await browser.scripting.updateContentScripts([
41+
{
42+
...contentScript,
43+
id,
44+
css: contentScript.css ?? [],
45+
},
46+
]);
4147
} else {
4248
logger.debug('Registering new content script...');
43-
await browser.scripting.registerContentScripts([{ ...contentScript, id }]);
49+
await browser.scripting.registerContentScripts([
50+
{
51+
...contentScript,
52+
id,
53+
css: contentScript.css ?? [],
54+
},
55+
]);
4456
}
4557

4658
await reloadTabsForContentScript(contentScript);

0 commit comments

Comments
 (0)