File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ class Live {
9595 private isLiveBlockerExperiement : ( ) => boolean ;
9696 private connectionsCount = 0 ;
9797 private setAwaitSend ( ) {
98+ if ( this . awaitSend ) {
99+ // There was already one set and never resolved. We need to resolve it to prevent
100+ // messages from getting stuck
101+ this . awaitSend . resolve ( ) ;
102+ }
98103 this . awaitSend = blocker ( ) ;
99104 clearTimeout ( this . awaitSendTimer ) ;
100105 this . awaitSendTimer = window . setTimeout ( async ( ) => {
Original file line number Diff line number Diff line change @@ -227,10 +227,11 @@ export const sendUnsavedChanges: Action<{
227227 ) ;
228228 changedModules . forEach ( m => {
229229 if ( ! moduleState [ m . shortid ] ) {
230+ const savedCode = getSavedCode ( m . code , m . savedCode ) ;
230231 // Update server with latest data
231232 effects . live . sendCodeUpdate (
232233 m . shortid ,
233- getTextOperation ( m . savedCode || '' , m . code || '' )
234+ getTextOperation ( savedCode , m . code || '' )
234235 ) ;
235236 }
236237 } ) ;
You can’t perform that action at this time.
0 commit comments