This repository was archived by the owner on May 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ function processRemoveFile(changedFile: ChangedFile) {
145145 // delete any destination files that match the source file
146146 const list = copyFilePathCache . get ( changedFile . filePath ) || [ ] ;
147147 copyFilePathCache . delete ( changedFile . filePath ) ;
148- const promises : Promise < void > [ ] = [ ] ;
148+ const promises : Promise < void [ ] > [ ] = [ ] ;
149149 const deletedFilePaths : string [ ] = [ ] ;
150150 list . forEach ( copiedFile => {
151151 const promise = unlinkAsync ( copiedFile . absoluteDestPath ) ;
@@ -251,8 +251,10 @@ export function copyConfigToWatchConfig(context: BuildContext): Watcher {
251251 const copyConfig : CopyConfig = fillConfigDefaults ( configFile , taskInfo . defaultConfigFile ) ;
252252 let results : GlobObject [ ] = [ ] ;
253253 for ( const key of Object . keys ( copyConfig ) ) {
254- const list = generateGlobTasks ( copyConfig [ key ] . src , { } ) ;
255- results = results . concat ( list ) ;
254+ if ( copyConfig [ key ] && copyConfig [ key ] . src ) {
255+ const list = generateGlobTasks ( copyConfig [ key ] . src , { } ) ;
256+ results = results . concat ( list ) ;
257+ }
256258 }
257259
258260 const paths : string [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments