refactor(navbar): optimize _getUpFromStateByUrl