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) {
145
145
// delete any destination files that match the source file
146
146
const list = copyFilePathCache . get ( changedFile . filePath ) || [ ] ;
147
147
copyFilePathCache . delete ( changedFile . filePath ) ;
148
- const promises : Promise < void > [ ] = [ ] ;
148
+ const promises : Promise < void [ ] > [ ] = [ ] ;
149
149
const deletedFilePaths : string [ ] = [ ] ;
150
150
list . forEach ( copiedFile => {
151
151
const promise = unlinkAsync ( copiedFile . absoluteDestPath ) ;
@@ -251,8 +251,10 @@ export function copyConfigToWatchConfig(context: BuildContext): Watcher {
251
251
const copyConfig : CopyConfig = fillConfigDefaults ( configFile , taskInfo . defaultConfigFile ) ;
252
252
let results : GlobObject [ ] = [ ] ;
253
253
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
+ }
256
258
}
257
259
258
260
const paths : string [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments