11/* eslint-disable max-len */
22/* eslint-disable no-param-reassign */
33/* eslint-disable function-paren-newline */
4+ /* eslint-disable implicit-arrow-linebreak */
45
56// store ports in an array
67const portsArr = [ ] ;
@@ -145,9 +146,9 @@ chrome.runtime.onMessage.addListener((request, sender) => {
145146
146147 // Filter out tabs that don't have reactime
147148 if (
148- action === 'tabReload' ||
149- action === 'recordSnap' ||
150- action === 'jumpToSnap'
149+ action === 'tabReload'
150+ || action === 'recordSnap'
151+ || action === 'jumpToSnap'
151152 ) {
152153 isReactTimeTravel = true ;
153154 } else return ;
@@ -202,7 +203,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
202203 new Node ( request . payload , tabsObj [ tabId ] ) ,
203204 ) ;
204205 if ( portsArr . length > 0 ) {
205- portsArr . forEach ( bg => bg . postMessage ( {
206+ portsArr . forEach ( bg =>
207+ bg . postMessage ( {
206208 action : 'initialConnectSnapshots' ,
207209 payload : tabsObj ,
208210 } ) ,
@@ -224,7 +226,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
224226 }
225227 // send message to devtools
226228 if ( portsArr . length > 0 ) {
227- portsArr . forEach ( bg => bg . postMessage ( {
229+ portsArr . forEach ( bg =>
230+ bg . postMessage ( {
228231 action : 'sendSnapshots' ,
229232 payload : tabsObj ,
230233 sourceTab,
@@ -242,7 +245,8 @@ chrome.runtime.onMessage.addListener((request, sender) => {
242245chrome . tabs . onRemoved . addListener ( tabId => {
243246 // tell devtools which tab to delete
244247 if ( portsArr . length > 0 ) {
245- portsArr . forEach ( bg => bg . postMessage ( {
248+ portsArr . forEach ( bg =>
249+ bg . postMessage ( {
246250 action : 'deleteTab' ,
247251 payload : tabId ,
248252 } ) ,
0 commit comments