File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -136,12 +136,17 @@ export default ({ channelName = defaultOpts.channelName } = defaultOpts) => {
136
136
} ;
137
137
138
138
browserAPI . runtime . sendMessage ( ...args , onErrorCallback ) ;
139
+
140
+ /*
141
+ * With this approach, if you open the extension in a new tab, we will patch the state twice.
142
+ * We still do not use redux for content scripts, so we can rework this code only if necessary.
143
+ */
139
144
// We will broadcast state changes to all tabs to sync state across content scripts
140
- return browserAPI . tabs . query ( { } , ( tabs ) => {
141
- for ( const tab of tabs ) {
142
- browserAPI . tabs . sendMessage ( tab . id , ...args , onErrorCallback ) ;
143
- }
144
- } ) ;
145
+ // return browserAPI.tabs.query({}, (tabs) => {
146
+ // for (const tab of tabs) {
147
+ // browserAPI.tabs.sendMessage(tab.id, ...args, onErrorCallback);
148
+ // }
149
+ // });
145
150
} ) ;
146
151
147
152
let currentState = store . getState ( ) ;
You can’t perform that action at this time.
0 commit comments