File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -552,6 +552,10 @@ class Live {
552552 return this . clients . has ( moduleShortid ) ;
553553 }
554554
555+ getClient ( moduleShortid : string ) {
556+ return this . clients . get ( moduleShortid ) ;
557+ }
558+
555559 getAllClients ( ) {
556560 return this . clients . getAll ( ) ;
557561 }
Original file line number Diff line number Diff line change @@ -374,7 +374,10 @@ export const codeChanged: Action<{
374374
375375 const savedCode = getSavedCode ( module . code , module . savedCode ) ;
376376 const isSavedCode = savedCode === code ;
377- const isFirstChange = ! effects . live . hasClient ( module . shortid ) ;
377+ const isFirstChange =
378+ ! effects . live . hasClient ( module . shortid ) ||
379+ ( effects . live . getClient ( moduleShortid ) . revision === 0 &&
380+ effects . live . getClient ( moduleShortid ) . state . name === 'Synchronized' ) ;
378381
379382 // Don't send saved code of a moduke that has not been registered with yet, since the server
380383 // will take the saved code as base. Which means that the change that would generate the saved code
You can’t perform that action at this time.
0 commit comments