mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Fix inconsistancy with encoding base64 with data-uri - wasn't calling right function
This commit is contained in:
@@ -68,8 +68,11 @@ module.exports = function(environment) {
|
||||
}
|
||||
}
|
||||
|
||||
buf = useBase64 ? buf.toString('base64')
|
||||
: encodeURIComponent(buf);
|
||||
if (useBase64 && !environment.encodeBase64) {
|
||||
return fallback(this, filePathNode);
|
||||
}
|
||||
|
||||
buf = useBase64 ? environment.encodeBase64(buf) : encodeURIComponent(buf);
|
||||
|
||||
var uri = "data:" + mimetype + ',' + buf + fragment;
|
||||
return new URL(new Quoted('"' + uri + '"', uri, false, this.index, this.currentFileInfo), this.index, this.currentFileInfo);
|
||||
|
||||
Reference in New Issue
Block a user