[Browse] Ensure selection at startup

...even when domain object identified by default path is
not found.
This commit is contained in:
Victor Woeltjen 2015-12-11 13:10:47 -08:00
parent 5f7f349f29
commit b8206b8824

View File

@ -123,6 +123,12 @@ define(
} else {
doNavigate(nextObject, index + 1);
}
} else if (index === 1 && c.length > 0) {
// Roots are in a top-level container that we don't
// want to be selected, so if we couldn't find an
// object at the path we wanted, at least select
// one of its children.
navigateTo(c[c.length - 1]);
} else {
// Couldn't find the next element of the path
// so navigate to the last path object we did find