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

Commit

Permalink
fix: fix "Cannot read property 'kill' of undefined" error (#822)
Browse files Browse the repository at this point in the history
`Cannot read property 'kill' of undefined` is thrown when `ctrl+c` is clicked too early when webpack process is started but still not persisted
  • Loading branch information
Fatme authored Feb 26, 2019
1 parent cfcec23 commit 8d18853
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ function logSnapshotWarningMessage($logger) {

function stopWebpackForPlatform(platform) {
const webpackProcess = webpackProcesses[platform];
webpackProcess.kill("SIGINT");
delete webpackProcesses[platform];
if (webpackProcess) {
webpackProcess.kill("SIGINT");
delete webpackProcesses[platform];
}
}

0 comments on commit 8d18853

Please sign in to comment.