Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Dec 28, 2017
1 parent 4d7d3a3 commit 17d0c05
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Bindable.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ public function bind(iterable $data, string $templateName = null):void {
$this->bindExisting($element, $data);

if(is_null($templateName)) {
$templateNames = $this->getRootDocument()->getNamedTemplate(
$templateName = $this->getRootDocument()->getNamedTemplate(
$this->getNodePath(),
true
);
}
else {
$templateNames = [$templateName];
}

foreach($templateNames as $templateName) {
if(!is_null($templateName)) {
$this->bindTemplates(
$element,
$data,
Expand Down

0 comments on commit 17d0c05

Please sign in to comment.