From 14ec677fe205c27a8fde2e9ba281fd4115248e60 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Wed, 22 Sep 2021 14:51:01 +0200 Subject: [PATCH] Fix/bug empty link (#27) --- src/Observers/ItemObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Observers/ItemObserver.php b/src/Observers/ItemObserver.php index d4761d8..42aa0b2 100644 --- a/src/Observers/ItemObserver.php +++ b/src/Observers/ItemObserver.php @@ -70,7 +70,7 @@ protected function cleanModel(MenuItem $item) } } - if (request()->get('link_type') === MenuItem::TYPE_EMPTY) { + if ((int) request()->get('link_type') === MenuItem::TYPE_EMPTY) { $item->{menuItem::linkTypesAttributes()[MenuItem::TYPE_EMPTY]} = 1; } else { $item->{menuItem::linkTypesAttributes()[MenuItem::TYPE_EMPTY]} = 0;