Skip to content

Commit

Permalink
Update Comparison.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloafer authored Oct 15, 2018
1 parent 229e591 commit 2777b95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Dust/Helper/Comparison.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ public function __invoke(Evaluate\Chunk $chunk, Evaluate\Context $context, Evalu
if ($selectInfo != null) {
$selectInfo->selectComparisonSatisfied = true;
}
return $chunk->render($bodies->block, $context);
if(!is_null($bodies->block)){
return $chunk->render($bodies->block, $context);
}else{
return $chunk;
}
} elseif (isset($bodies['else'])) {
return $chunk->render($bodies['else'], $context);
} else return $chunk;
}

public function isValid($key, $value) { return false; }

}
}

0 comments on commit 2777b95

Please sign in to comment.