Skip to content

Commit 8857888

Browse files
author
Ives van Hoorne
committed
Don't show non-vital error messages on production
1 parent 6728a51 commit 8857888

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/components/sandbox/CodeEditor/monaco/workers/fetch-dependency-typings.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,11 @@ function fetchAndAddDependencies(dependencies) {
216216
loadedTypings.push(dep);
217217
}
218218
} catch (e) {
219-
console.log(`Couldn't find typings for ${dep}`);
220-
console.error(e);
219+
// Don't show these cryptic messages to users, because this is not vital
220+
if (process.env.NODE_ENV === 'development') {
221+
console.log(`Couldn't find typings for ${dep}`);
222+
console.error(e);
223+
}
221224
}
222225
});
223226
}

0 commit comments

Comments
 (0)