1
1
/* eslint-disable max-len */
2
2
/* eslint-disable no-param-reassign */
3
3
/* eslint-disable function-paren-newline */
4
+ /* eslint-disable implicit-arrow-linebreak */
4
5
5
6
// store ports in an array
6
7
const portsArr = [ ] ;
@@ -145,9 +146,9 @@ chrome.runtime.onMessage.addListener((request, sender) => {
145
146
146
147
// Filter out tabs that don't have reactime
147
148
if (
148
- action === 'tabReload' ||
149
- action === 'recordSnap' ||
150
- action === 'jumpToSnap'
149
+ action === 'tabReload'
150
+ || action === 'recordSnap'
151
+ || action === 'jumpToSnap'
151
152
) {
152
153
isReactTimeTravel = true ;
153
154
} else return ;
@@ -202,7 +203,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
202
203
new Node ( request . payload , tabsObj [ tabId ] ) ,
203
204
) ;
204
205
if ( portsArr . length > 0 ) {
205
- portsArr . forEach ( bg => bg . postMessage ( {
206
+ portsArr . forEach ( bg =>
207
+ bg . postMessage ( {
206
208
action : 'initialConnectSnapshots' ,
207
209
payload : tabsObj ,
208
210
} ) ,
@@ -224,7 +226,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
224
226
}
225
227
// send message to devtools
226
228
if ( portsArr . length > 0 ) {
227
- portsArr . forEach ( bg => bg . postMessage ( {
229
+ portsArr . forEach ( bg =>
230
+ bg . postMessage ( {
228
231
action : 'sendSnapshots' ,
229
232
payload : tabsObj ,
230
233
sourceTab,
@@ -242,7 +245,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
242
245
chrome . tabs . onRemoved . addListener ( tabId => {
243
246
// tell devtools which tab to delete
244
247
if ( portsArr . length > 0 ) {
245
- portsArr . forEach ( bg => bg . postMessage ( {
248
+ portsArr . forEach ( bg =>
249
+ bg . postMessage ( {
246
250
action : 'deleteTab' ,
247
251
payload : tabId ,
248
252
} ) ,
0 commit comments