mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Fix for in without hasOwnProperty
This commit is contained in:
@@ -23,14 +23,17 @@ tree.JavaScript.prototype = {
|
||||
index: this.index };
|
||||
}
|
||||
|
||||
for (var k in env.frames[0].variables()) {
|
||||
/*jshint loopfunc:true */
|
||||
context[k.slice(1)] = {
|
||||
value: env.frames[0].variables()[k].value,
|
||||
toJS: function () {
|
||||
return this.value.eval(env).toCSS();
|
||||
}
|
||||
};
|
||||
var variables = env.frames[0].variables();
|
||||
for (var k in variables) {
|
||||
if (variables.hasOwnProperty(k)) {
|
||||
/*jshint loopfunc:true */
|
||||
context[k.slice(1)] = {
|
||||
value: variables[k].value,
|
||||
toJS: function () {
|
||||
return this.value.eval(env).toCSS();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user