File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ browser.runtime.onMessage.addListener(
16
16
if ( ! tabsStorage [ sender . tab . id ] ) {
17
17
tabsStorage [ sender . tab . id ] = message . payload
18
18
} else {
19
+ // temporary fix when hit CSP
20
+ if ( ! message . payload . modules . length ) delete message . payload . modules
21
+ if ( ! message . payload . plugins . length ) delete message . payload . plugins
22
+
19
23
tabsStorage [ sender . tab . id ] = { ...tabsStorage [ sender . tab . id ] , ...message . payload }
20
24
}
21
25
@@ -33,6 +37,14 @@ browser.runtime.onMessage.addListener(
33
37
} )
34
38
showcase . isPublic = res . body . isPublic
35
39
showcase . slug = res . body . slug
40
+
41
+ // temporary fix when hit CSP
42
+ if ( ! showcase . modules . length && res . body . modules . length ) {
43
+ showcase . modules = res . body . modules
44
+ }
45
+ if ( ! showcase . plugins . length && res . body . plugins . length ) {
46
+ showcase . plugins = res . body . plugins
47
+ }
36
48
} catch ( err ) { }
37
49
}
38
50
// tabsStorage[sender.tab.id] = message.payload
You can’t perform that action at this time.
0 commit comments