diff --git a/CHANGELOG.md b/CHANGELOG.md index 5486a9d6..f167503e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 1.7.3 +- bug fixes + - custom module: prevent reloading the module while the file is being written to + - widgets - encoder: add `ticks` property back diff --git a/src/server/custom-module.js b/src/server/custom-module.js index 96ec1961..f29664a2 100644 --- a/src/server/custom-module.js +++ b/src/server/custom-module.js @@ -65,7 +65,7 @@ class CustomModule { this.load() - this.watcher = chokidar.watch(this.filename).on('change', ()=>{ + this.watcher = chokidar.watch(this.filename, {awaitWriteFinish: {stabilityThreshold: 200}}).on('change', ()=>{ if (this.submodule) { console.log('(INFO) Submodule changed: ' + this.filename) this.parent.reload()