Skip to content

Commit 0e5a0a5

Browse files
committed
fix(webpack): test watch instance before closing it
1 parent e0299ca commit 0e5a0a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/webpack/src/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ async function compile (compiler: Compiler) {
190190
const compilersWatching: Array<Watching | MultiWatching> = []
191191

192192
nuxt.hook('close', async () => {
193-
await Promise.all(compilersWatching.map(watching => pify(watching.close.bind(watching))()))
193+
await Promise.all(compilersWatching.map(watching => watching && pify(watching.close.bind(watching))()))
194194
})
195195

196196
// Client build

0 commit comments

Comments
 (0)