babel-plugin-universal-import
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -27,6 +27,5 @@ /* eslint-disable */ | ||
if (ADDED[href] === true) { | ||
return Promise.resolve() | ||
if (ADDED[href]) { | ||
return ADDED[href] | ||
} | ||
ADDED[href] = true | ||
@@ -41,5 +40,4 @@ var head = document.getElementsByTagName('head')[0] | ||
return new Promise(function(resolve, reject) { | ||
var timeout | ||
var img | ||
var promise = new Promise(function(resolve, reject) { | ||
var timeout, img | ||
@@ -63,4 +61,3 @@ var onload = function() { | ||
clearTimeout(timeout) | ||
var message = 'could not load css chunk: ' + chunkName | ||
reject(new Error(message)) | ||
reject(new Error('could not load css chunk: ' + chunkName)) | ||
} | ||
@@ -85,2 +82,6 @@ | ||
}) | ||
ADDED[href] = promise | ||
return promise | ||
} | ||
@@ -87,0 +88,0 @@ |
{ | ||
"name": "babel-plugin-universal-import", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Babel plugin to transform import() into its Universal counterpart", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
419039
821