aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PscIde.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PscIde.js b/src/PscIde.js
index b164dc2..bf92b38 100644
--- a/src/PscIde.js
+++ b/src/PscIde.js
@@ -154,11 +154,13 @@ function rebuild(psModule) {
154 .then(compileMessages => { 154 .then(compileMessages => {
155 if (res.resultType === 'error') { 155 if (res.resultType === 'error') {
156 if (res.result.some(item => { 156 if (res.result.some(item => {
157 const isModuleNotFound = item.errorCode === 'ModuleNotFound';
158
157 const isUnknownModule = item.errorCode === 'UnknownModule'; 159 const isUnknownModule = item.errorCode === 'UnknownModule';
158 160
159 const isUnknownModuleImport = item.errorCode === 'UnknownName' && /Unknown module/.test(item.message); 161 const isUnknownModuleImport = item.errorCode === 'UnknownName' && /Unknown module/.test(item.message);
160 162
161 return isUnknownModule || isUnknownModuleImport; 163 return isModuleNotFound || isUnknownModule || isUnknownModuleImport;
162 })) { 164 })) {
163 debug('unknown module, attempting full recompile') 165 debug('unknown module, attempting full recompile')
164 return Psc.compile(psModule) 166 return Psc.compile(psModule)