Skip to content

Commit

Permalink
Merge pull request #50 from elgentos/null-value-issue
Browse files Browse the repository at this point in the history
Solve return null value issue
  • Loading branch information
govereem authored Feb 17, 2021
2 parents 93dee85 + 8687e8e commit 555a9a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Block/Dom/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function fetchDocumentView(): string
}
$url = PrismicLink::asUrl($context, $this->getLinkResolver() ?? '');

if(!$url) {
return '';
}

return $this->escapeUrl($this->replaceRelativeUrl($url));
}
}

0 comments on commit 555a9a8

Please sign in to comment.