mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Fix #1536 - pattern used in bootstrap is causing a recursion error
This commit is contained in:
@@ -41,6 +41,7 @@ tree.mixin.Call.prototype = {
|
||||
try {
|
||||
if (!(mixin instanceof tree.mixin.Definition)) {
|
||||
mixin = new tree.mixin.Definition("", [], mixin.rules, null, false);
|
||||
mixin.originalRuleset = mixins[m].originalRuleset || mixins[m];
|
||||
}
|
||||
Array.prototype.push.apply(
|
||||
rules, mixin.eval(env, args, this.important).rules);
|
||||
@@ -203,9 +204,9 @@ tree.mixin.Definition.prototype = {
|
||||
rules = important ?
|
||||
this.parent.makeImportant.apply(this).rules : this.rules.slice(0);
|
||||
|
||||
ruleset = new(tree.Ruleset)(null, rules).eval(new(tree.evalEnv)(env,
|
||||
[this, frame].concat(mixinFrames)));
|
||||
ruleset = new(tree.Ruleset)(null, rules);
|
||||
ruleset.originalRuleset = this;
|
||||
ruleset = ruleset.eval(new(tree.evalEnv)(env, [this, frame].concat(mixinFrames)));
|
||||
return ruleset;
|
||||
},
|
||||
matchCondition: function (args, env) {
|
||||
|
||||
@@ -112,3 +112,12 @@ h3 { .margin_between(15px, 5px); }
|
||||
|
||||
&.large { .paddingFloat(((10em * 2) * 2)); }
|
||||
}
|
||||
.clearfix() {
|
||||
// ...
|
||||
}
|
||||
.clearfix {
|
||||
.clearfix();
|
||||
}
|
||||
.foo {
|
||||
.clearfix();
|
||||
}
|
||||
Reference in New Issue
Block a user