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

Add undefined check to file delete watcher #1211

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Add undefined check to file delete watcher #1211

merged 1 commit into from
Dec 4, 2017

Conversation

hugmanrique
Copy link
Contributor

@hugmanrique hugmanrique commented Dec 3, 2017

Fixes #1208
Fixes #1157

The watcher close function gets called with an undefined file sometimes when you rename/delete a file. The default Node.js fs.watch function is known for having some bugs, but adding an undefined check before deleting the file fixes the problem until the webpack team fixes it.

Closes #1208 

The `file` might be `undefined` if it's a temporary file that's deleted before the transformers run.
@MoOx MoOx merged commit a132ad0 into MoOx:master Dec 4, 2017
@MoOx
Copy link
Owner

MoOx commented Dec 4, 2017

Nice catch! Will cut a release asap :)

MoOx pushed a commit that referenced this pull request Dec 4, 2017
…d (or saved with vim) (#1211)

Fixes #1208
Fixes #1157

The `file` might be `undefined` if it's a temporary file that's deleted before the transformers run.

The watcher close function gets called with an undefined file sometimes when you rename/delete a file. The default Node.js fs.watch function is known for having some bugs, but adding an undefined check before deleting the file fixes the problem until the webpack team fixes it.
@hugmanrique hugmanrique deleted the patch-1 branch December 4, 2017 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in watcher while editing a MD file Dev server crashes when file is renamed
2 participants