Fix url import. Fixes #2089.

This commit is contained in:
Luke Page
2014-09-07 14:40:28 +01:00
parent bc42a73886
commit 50e299b8bc
6 changed files with 14 additions and 1 deletions

View File

@@ -75,7 +75,11 @@ Import.prototype.getPath = function () {
return null;
};
Import.prototype.evalForImport = function (env) {
return new(Import)(this.path.eval(env), this.features, this.options, this.index, this.currentFileInfo);
var path = this.path;
if (path instanceof URL) {
path = path.value;
}
return new(Import)(path.eval(env), this.features, this.options, this.index, this.currentFileInfo);
};
Import.prototype.evalPath = function (env) {
var path = this.path.eval(env);