Skip to content

Commit

Permalink
fix: patch up @else bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Feb 17, 2023
1 parent f80b3cd commit 3cdb6d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/UI/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ public static function compileTemplate(string $rawText, array $state = []): stri
preg_match('/@else\s*(.*?)\s*@endif/', $compiledWithParsedConditions, $elseConditionMatches);
$renderedData = $elseConditionMatches[1];
}
} else {
if (strpos($compiledWithParsedConditions, '@else') !== false) {
preg_match('/@else\s*(.*?)\s*@endif/', $compiledWithParsedConditions, $elseConditionMatches);
$renderedData = $elseConditionMatches[1];
}
}
}

Expand Down

0 comments on commit 3cdb6d1

Please sign in to comment.