• Francisco Javier López's avatar
    Fix bug in sidebar when menu item cannot be rendered · 226678b9
    Francisco Javier López authored
    When a user is rendering the project sidebar and any menu item
    is not possible to render, we return a `nil` value.
    
    This introduces an edge case when we want to insert another menu item
    before or after that menu, because it was returned as `nil` and,
    therefore not introduced in the menu item list.
    
    In this MR, we switched to a Null object pattern, in which we return
    a nil menu item instead of just a nil value.
    226678b9
learn_gitlab_menu_spec.rb 2.02 KB