From 5d7e991dcf1ece659c931b54b4cad784c3f36edb Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 17 Dec 2024 17:21:06 +0000 Subject: [PATCH] Filter out null values to prevent them being saved to the tree. --- .../Controllers/CP/Navigation/NavigationTreeController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/CP/Navigation/NavigationTreeController.php b/src/Http/Controllers/CP/Navigation/NavigationTreeController.php index 67c9a2f477..75408d71b4 100644 --- a/src/Http/Controllers/CP/Navigation/NavigationTreeController.php +++ b/src/Http/Controllers/CP/Navigation/NavigationTreeController.php @@ -66,7 +66,8 @@ private function updateData(array $data, Blueprint $blueprint) ->addValues($branch['values'] ?? []) ->process() ->values() - ->only($branch['localizedFields'] ?? []); + ->only($branch['localizedFields'] ?? []) + ->filter(); if ($branch['new'] ?? false) { $newId = BranchIdGenerator::generate();