From dd8658a59a7b0ac763a789d7db8083ad5e460827 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 15 Aug 2018 09:59:06 +0100 Subject: [PATCH] Reload config when a file is added/removed --- lib/core/engine.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/engine.js b/lib/core/engine.js index 29bf577cb..56dd62df6 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -179,6 +179,7 @@ class Engine { self.fileTimeout = setTimeout(() => { // TODO: still need to redeploy contracts because the original contracts // config is being corrupted + self.config.reloadConfig(); if (fileType === 'asset') { // Throttle file changes so we re-write only once for all files self.events.emit('asset-changed', self.contractsManager); @@ -186,8 +187,6 @@ class Engine { // TODO: for now need to deploy on asset changes as well // because the contractsManager config is corrupted after a deploy if (fileType === 'contract' || fileType === 'config') { - self.config.reloadConfig(); - self.events.request('deploy:contracts', () => {}); } }, 50);