Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 8d18853

Browse files
author
Fatme
authored
fix: fix "Cannot read property 'kill' of undefined" error (#822)
`Cannot read property 'kill' of undefined` is thrown when `ctrl+c` is clicked too early when webpack process is started but still not persisted
1 parent cfcec23 commit 8d18853

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: lib/compiler.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ function logSnapshotWarningMessage($logger) {
173173

174174
function stopWebpackForPlatform(platform) {
175175
const webpackProcess = webpackProcesses[platform];
176-
webpackProcess.kill("SIGINT");
177-
delete webpackProcesses[platform];
176+
if (webpackProcess) {
177+
webpackProcess.kill("SIGINT");
178+
delete webpackProcesses[platform];
179+
}
178180
}
179181

0 commit comments

Comments
 (0)