Skip to content

Commit

Permalink
sass#548 Fixing orphaned variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kimn committed Mar 17, 2015
1 parent 776e997 commit 324b14f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ namespace Sass {
{
String* old_p = d->property();
String* new_p = static_cast<String*>(old_p->perform(eval->with(env, backtrace)));
Selector* p = selector_stack.size() >= 1 ? 0 : selector_stack.back();
Expression* value = d->value()->perform(eval->with(selector_stack.back(), env, backtrace));
Selector* p = selector_stack.size() <= 1 ? 0 : selector_stack.back();
Expression* value = d->value()->perform(eval->with(p, env, backtrace));
if (value->is_invisible() && !d->is_important()) return 0;
Declaration* decl = new (ctx.mem) Declaration(d->pstate(),
new_p,
Expand All @@ -218,7 +218,7 @@ namespace Sass {
Statement* Expand::operator()(Assignment* a)
{
string var(a->variable());
Selector* p = selector_stack.size() >= 1 ? 0 : selector_stack.back();
Selector* p = selector_stack.size() <= 1 ? 0 : selector_stack.back();
if (env->has(var)) {
Expression* v = static_cast<Expression*>((*env)[var]);
if (!a->is_guarded() || v->concrete_type() == Expression::NULL_VAL) (*env)[var] = a->value()->perform(eval->with(p, env, backtrace));
Expand Down

0 comments on commit 324b14f

Please sign in to comment.