From 1427319ab696b315275cd058326b5c1eba3dd6dd Mon Sep 17 00:00:00 2001 From: guybedford Date: Thu, 15 May 2014 11:55:38 -0700 Subject: [PATCH] callback adjustment --- css.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/css.js b/css.js index 147b0f3..85d24ce 100644 --- a/css.js +++ b/css.js @@ -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'; @@ -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); }