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

Commit

Permalink
callback adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 15, 2014
1 parent 175f741 commit 1427319
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions css.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ var loadCSS = function(url) {
var _callback = function() {
clearTimeout(timeout);
link.onload = noop;
setTimeout(resolve, 7);
setTimeout(function() {
resolve('');
}, 7);
}
var link = document.createElement('link') ;
link.type = 'text/css';
Expand All @@ -51,6 +53,6 @@ exports.fetch = function(load) {
// dont reload styles loaded in the head
for (var i = 0; i < linkHrefs.length; i++)
if (load.address == linkHrefs[i])
return callback('');
return '';
return loadCSS(load.address);
}

0 comments on commit 1427319

Please sign in to comment.