diff --git a/src/loaders/ImageLoader.js b/src/loaders/ImageLoader.js index f2ea0760..6aa4fbfc 100644 --- a/src/loaders/ImageLoader.js +++ b/src/loaders/ImageLoader.js @@ -88,7 +88,10 @@ const ImageLoader = { request = new window.XMLHttpRequest(); request.open('GET', url, true); - if (process.env.npm_lifecycle_event !== 'test') { + if ( + typeof process === 'object' && + process.env.npm_lifecycle_event !== 'test' + ) { /* istanbul ignore next */ request.onreadystatechange = function () { if (this.readyState === 4 && this.status >= 400) { @@ -131,4 +134,4 @@ const ImageLoader = { }; -export { ImageLoader }; \ No newline at end of file +export { ImageLoader };