@@ -83,20 +83,20 @@ class App extends Component {
8383 // If the user paused the recording session, we return
8484 const { isRecording } = this . state ;
8585 if ( ! isRecording ) return ;
86-
86+ console . log ( 'got new data' ) ;
8787 const newData = {
8888 action : msg . action ,
8989 state : msg . state ,
9090 prevState : msg . prevState ,
9191 id : this . state . data . length ,
9292 } ;
93-
93+
9494 // search field
9595 const { searchField } = this . state ;
9696 const newDataActionType = newData . action . type . toLowerCase ( ) ;
9797
9898 const eventTime = Date . now ( ) ;
99-
99+
100100 // get the date everytime an action fires and add it to state
101101 if ( newDataActionType . includes ( searchField . toLowerCase ( ) ) ) {
102102 this . setState ( state => ( {
@@ -151,8 +151,12 @@ class App extends Component {
151151 // if we are hitting the pause or re-starting the record session
152152 if ( isRecording || this . hasInjectedScript ) return ;
153153
154+ // We set our port to null so that when the page refreshes, we can
155+ // reupdate it to the new value.
156+ this . portToExtension = null ;
157+
154158 // This variable will prevent the app from refreshing when we refresh
155- // the userpage.
159+ // the userpage after starting to record .
156160 this . justStartedRecording = true ;
157161 this . hasInjectedScript = true ;
158162
@@ -291,6 +295,7 @@ class App extends Component {
291295
292296 this . justStartedRecording = false ;
293297 this . hasInjectedScript = false ;
298+
294299 this . setState ( {
295300 data : [ ] ,
296301 searchField : '' ,
0 commit comments