@@ -13,7 +13,8 @@ module.exports = (snap, mode) => {
1313
1414 function sendSnapshot ( ) {
1515 // don't send messages while jumping or while paused
16- // DEV: So that when we are jumping to an old snapshot it wouldn't think we want to create new snapshots
16+ // DEV: So that when we are jumping to an old snapshot it
17+ // wouldn't think we want to create new snapshots
1718 if ( mode . jumping || mode . paused ) return ;
1819 const payload = snap . tree . getCopy ( ) ;
1920 // console.log('payload', payload);
@@ -83,7 +84,7 @@ module.exports = (snap, mode) => {
8384
8485 function createTree ( currentFiber , tree = new Tree ( 'root' ) ) {
8586 if ( ! currentFiber ) return tree ;
86-
87+
8788 const {
8889 sibling,
8990 stateNode,
@@ -103,9 +104,9 @@ module.exports = (snap, mode) => {
103104 // Check if the component uses hooks
104105 if ( memoizedState && Object . hasOwnProperty . call ( memoizedState , 'baseState' ) ) {
105106 // Traverse through the currentFiber and extract the getters/setters
106- astHooks = astParser ( elementType ) ;
107- saveState ( astHooks ) ;
108- // Create a traversed property and assign to the evaluated result of
107+ astHooks = astParser ( elementType ) ;
108+ saveState ( astHooks ) ;
109+ // Create a traversed property and assign to the evaluated result of
109110 // invoking traverseHooks with memoizedState
110111 memoizedState . traversed = traverseHooks ( memoizedState ) ;
111112 nextTree = tree . appendChild ( memoizedState ) ;
@@ -131,7 +132,7 @@ module.exports = (snap, mode) => {
131132 } = container ;
132133 // only assign internal rootp if it actually exists
133134 fiberRoot = _internalRoot || _reactRootContainer ;
134-
135+
135136 updateSnapShotTree ( ) ;
136137 // send the initial snapshot once the content script has started up
137138 window . addEventListener ( 'message' , ( { data : { action } } ) => {
@@ -145,5 +146,5 @@ module.exports = (snap, mode) => {
145146 // return getNextImport('./UseStateHook');
146147 // return 'Testing outside';
147148 // const OtherComponent = loadable(() => import('./OtherComponent'))
148- }
149- } ;
149+ } ;
150+ } ;
0 commit comments