File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -921,11 +921,12 @@ public function moveItemUp(int $itemId): void
921921 {
922922 try {
923923 $ item = $ this ->getMenuItemSecurely ($ itemId );
924- if (!$ item ) {
924+ if (! $ item ) {
925925 Notification::make ()
926926 ->title (flexiblePagesTrans ('menu_items.errors.item_not_found ' ))
927927 ->danger ()
928928 ->send ();
929+
929930 return ;
930931 }
931932
@@ -936,15 +937,15 @@ public function moveItemUp(int $itemId): void
936937
937938 // Refresh the tree to show new order
938939 $ this ->refreshTree ();
939-
940+
940941 Notification::make ()
941942 ->title ('Menu item moved up successfully. ' )
942943 ->success ()
943944 ->send ();
944945 }
945946 } catch (Exception $ e ) {
946947 Notification::make ()
947- ->title ('Failed to move menu item: ' . $ e ->getMessage ())
948+ ->title ('Failed to move menu item: ' . $ e ->getMessage ())
948949 ->danger ()
949950 ->send ();
950951 }
@@ -954,11 +955,12 @@ public function moveItemDown(int $itemId): void
954955 {
955956 try {
956957 $ item = $ this ->getMenuItemSecurely ($ itemId );
957- if (!$ item ) {
958+ if (! $ item ) {
958959 Notification::make ()
959960 ->title (flexiblePagesTrans ('menu_items.errors.item_not_found ' ))
960961 ->danger ()
961962 ->send ();
963+
962964 return ;
963965 }
964966
@@ -969,15 +971,15 @@ public function moveItemDown(int $itemId): void
969971
970972 // Refresh the tree to show new order
971973 $ this ->refreshTree ();
972-
974+
973975 Notification::make ()
974976 ->title ('Menu item moved down successfully. ' )
975977 ->success ()
976978 ->send ();
977979 }
978980 } catch (Exception $ e ) {
979981 Notification::make ()
980- ->title ('Failed to move menu item: ' . $ e ->getMessage ())
982+ ->title ('Failed to move menu item: ' . $ e ->getMessage ())
981983 ->danger ()
982984 ->send ();
983985 }
You can’t perform that action at this time.
0 commit comments