Fix bug in sidebar when menu item cannot be rendered
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.
Showing
This diff is collapsed.
Please register or sign in to comment