Skip to content

Commit

Permalink
Fix support for undefined tasks in watch.js
Browse files Browse the repository at this point in the history
Amends 596ff7a
  • Loading branch information
mcaskill authored Aug 10, 2023
1 parent 95caf9e commit e9dbb03
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions build/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,18 @@ function configureServer(server, { paths, tasks }) {
});

// Watch source concats
server.watch(
resolve(
tasks.concats.reduce(
(patterns, { includes }) => patterns.concat(includes),
[]
if (tasks.concats?.length) {
server.watch(
resolve(
tasks.concats.reduce(
(patterns, { includes }) => patterns.concat(includes),
[]
)
)
)
).on('change', () => {
concatFiles(...developmentConcatFilesArgs);
});
).on('change', () => {
concatFiles(...developmentConcatFilesArgs);
});
}

// Watch source styles
server.watch(
Expand Down

0 comments on commit e9dbb03

Please sign in to comment.