Skip to content

Commit

Permalink
Null check for missing template names
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Nov 26, 2018
1 parent c5cf755 commit da49db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HTMLDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getComponentDirectory():string {

public function getNamedTemplate(string $name):?DocumentFragment {
/** @var \Gt\DomTemplate\DocumentFragment $fragment */
$fragment = $this->templateFragmentMap[$name];
$fragment = $this->templateFragmentMap[$name] ?? null;

if($fragment) {
$clone = $fragment->cloneNode(true);
Expand Down

0 comments on commit da49db6

Please sign in to comment.