File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
581
581
let filesToRemove : string [ ] = [ ] ;
582
582
let timeoutTimer : NodeJS . Timer ;
583
583
584
- const startSyncFilesTimeout = ( platform ?: string ) => {
584
+ const startSyncFilesTimeout = ( ) => {
585
585
timeoutTimer = setTimeout ( async ( ) => {
586
586
if ( liveSyncData . syncToPreviewApp ) {
587
587
await this . addActionToChain ( projectData . projectDir , async ( ) => {
@@ -691,12 +691,18 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
691
691
} ,
692
692
platforms
693
693
} ,
694
+ filesToSync,
694
695
filesToSyncMap,
695
696
filesToRemove,
696
697
startSyncFilesTimeout : async ( platform : string ) => {
697
- filesToSync = filesToSyncMap [ platform ] ;
698
- await startSyncFilesTimeout ( platform ) ;
699
- filesToSyncMap [ platform ] = [ ] ;
698
+ if ( platform ) {
699
+ filesToSync = filesToSyncMap [ platform ] ;
700
+ await startSyncFilesTimeout ( ) ;
701
+ filesToSyncMap [ platform ] = [ ] ;
702
+ } else {
703
+ // This code is added for backwards compatibility with old versions of nativescript-dev-webpack plugin.
704
+ await startSyncFilesTimeout ( ) ;
705
+ }
700
706
}
701
707
}
702
708
} ) ;
You can’t perform that action at this time.
0 commit comments