lib/simple_navigation/item.rb in simple-navigation-4.0.2 vs lib/simple_navigation/item.rb in simple-navigation-4.0.3

- old
+ new

@@ -151,11 +151,12 @@ relevant_url end def selected_by_autohighlight? return false unless auto_highlight? + root_path_match? || - SimpleNavigation.current_page?(url_for_autohighlight) || + (url_for_autohighlight && SimpleNavigation.current_page?(url_for_autohighlight)) || autohighlight_by_subpath? end def autohighlight_by_subpath? config.highlight_on_subpath && selected_by_subpath?