From 0b1d710eaee14ed50b196ed67a07e5963dedad3f Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 13 May 2024 10:40:12 +0100 Subject: [PATCH] Prevent errors when viewing nav after collection has been deleted --- src/Structures/Nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structures/Nav.php b/src/Structures/Nav.php index da840d64ad..ef997fcf3c 100644 --- a/src/Structures/Nav.php +++ b/src/Structures/Nav.php @@ -71,7 +71,7 @@ public function collections($collections = null) ->getter(function ($collections) { return collect($collections)->map(function ($collection) { return Collection::findByHandle($collection); - }); + })->filter(); }) ->args(func_get_args()); }