Fix #1536 - pattern used in bootstrap is causing a recursion error

This commit is contained in:
Luke Page
2013-09-09 22:11:29 +01:00
parent 1f456ffc18
commit 4c552349e5
2 changed files with 12 additions and 2 deletions

View File

@@ -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) {

View File

@@ -112,3 +112,12 @@ h3 { .margin_between(15px, 5px); }
&.large { .paddingFloat(((10em * 2) * 2)); }
}
.clearfix() {
// ...
}
.clearfix {
.clearfix();
}
.foo {
.clearfix();
}