Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 1427319

Browse files
committed
callback adjustment
1 parent 175f741 commit 1427319

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

css.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ var loadCSS = function(url) {
3131
var _callback = function() {
3232
clearTimeout(timeout);
3333
link.onload = noop;
34-
setTimeout(resolve, 7);
34+
setTimeout(function() {
35+
resolve('');
36+
}, 7);
3537
}
3638
var link = document.createElement('link') ;
3739
link.type = 'text/css';
@@ -51,6 +53,6 @@ exports.fetch = function(load) {
5153
// dont reload styles loaded in the head
5254
for (var i = 0; i < linkHrefs.length; i++)
5355
if (load.address == linkHrefs[i])
54-
return callback('');
56+
return '';
5557
return loadCSS(load.address);
5658
}

0 commit comments

Comments
 (0)