Merge pull request #169 from alkemist/master

(fix) including .less files via absolute path with IE7
This commit is contained in:
Alexis Sellier
2011-05-11 08:54:30 -07:00

View File

@@ -123,7 +123,11 @@ function loadStyleSheet(sheet, callback, reload, remaining) {
// Stylesheets in IE don't always return the full path
if (! /^(https?|file):/.test(href)) {
href = url.slice(0, url.lastIndexOf('/') + 1) + href;
if (href.charAt(0) == "/") {
href = window.location.protocol + "//" + window.location.host + href;
} else {
href = url.slice(0, url.lastIndexOf('/') + 1) + href;
}
}
xhr(sheet.href, sheet.type, function (data, lastModified) {