🎨 Improve error message

This commit is contained in:
Bruno Queiros 2016-05-18 11:00:08 -03:00
parent e05f795d1d
commit 06e3e65c1b

View file

@ -121,7 +121,7 @@ if (preloadScript) {
try {
require(preloadScript)
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
if (error.code === 'MODULE_NOT_FOUND' && error.message.indexOf(preloadScript) > -1) {
console.error('Unable to load preload script ' + preloadScript)
} else {
console.error(error)