mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Don't try to select a nav item if the selected item is explicitly null
Summary: If there are items (like labels) without keys, we incorrectly select the first item with no key in response to a `selectFilter(null)` call. Test Plan: Called `selectFilter(null)`, didn't get a selected label. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D4428
This commit is contained in:
parent
9470ab0576
commit
ac5520e089
1 changed files with 5 additions and 3 deletions
|
@ -136,9 +136,11 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
}
|
||||
}
|
||||
|
||||
$selected_item = $this->menu->getItem($this->selectedFilter);
|
||||
if ($selected_item) {
|
||||
$selected_item->addClass('phabricator-menu-item-selected');
|
||||
if ($this->selectedFilter !== null) {
|
||||
$selected_item = $this->menu->getItem($this->selectedFilter);
|
||||
if ($selected_item) {
|
||||
$selected_item->addClass('phabricator-menu-item-selected');
|
||||
}
|
||||
}
|
||||
|
||||
require_celerity_resource('phabricator-side-menu-view-css');
|
||||
|
|
Loading…
Reference in a new issue