From 8687e8ef1e08fa105f4ce25f88f35a8da06e08e1 Mon Sep 17 00:00:00 2001 From: gideon Date: Wed, 17 Feb 2021 15:06:00 +0100 Subject: [PATCH] Solve return null value issue --- Block/Dom/Link.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Block/Dom/Link.php b/Block/Dom/Link.php index 34cce02..93cf4ef 100644 --- a/Block/Dom/Link.php +++ b/Block/Dom/Link.php @@ -21,6 +21,10 @@ public function fetchDocumentView(): string } $url = PrismicLink::asUrl($context, $this->getLinkResolver() ?? ''); + if(!$url) { + return ''; + } + return $this->escapeUrl($this->replaceRelativeUrl($url)); } }