mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
attempt to fix IE relative urls
This commit is contained in:
@@ -114,11 +114,17 @@ function loadStyleSheets(callback, reload) {
|
||||
}
|
||||
|
||||
function loadStyleSheet(sheet, callback, reload, remaining) {
|
||||
var url = window.location.href;
|
||||
var href = sheet.href.replace(/\?.*$/, '');
|
||||
var css = cache && cache.getItem(href);
|
||||
var timestamp = cache && cache.getItem(href + ':timestamp');
|
||||
var styles = { css: css, timestamp: timestamp };
|
||||
|
||||
// Stylesheets in IE don't always return the full path
|
||||
if (! /^(https?|file):/.test(href)) {
|
||||
href = url.slice(0, url.lastIndexOf('/') + 1) + href;
|
||||
}
|
||||
|
||||
xhr(sheet.href, function (data, lastModified) {
|
||||
if (!reload && styles &&
|
||||
(new(Date)(lastModified).valueOf() ===
|
||||
|
||||
Reference in New Issue
Block a user