fix(aio): currentNode url should not contain hash or search
This commit is contained in:
parent
92e14a36f9
commit
928e2543cd
|
@ -148,8 +148,8 @@ describe('NavigationService', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should be undefined if no side navigation node matches the current location', () => {
|
||||
location.urlSubject.next('g');
|
||||
it('should be a plain object if no side navigation node matches the current location', () => {
|
||||
location.urlSubject.next('g?search=moo#anchor-1');
|
||||
expect(currentNode).toEqual({
|
||||
url: 'g',
|
||||
view: '',
|
||||
|
|
|
@ -95,7 +95,7 @@ export class NavigationService {
|
|||
(navMap, url) => {
|
||||
let urlKey = cleanUrl(url);
|
||||
urlKey = urlKey.startsWith('api/') ? 'api' : urlKey;
|
||||
return navMap[urlKey] || { view: '', url, nodes: [] };
|
||||
return navMap[urlKey] || { view: '', url: urlKey, nodes: [] };
|
||||
})
|
||||
.publishReplay(1);
|
||||
currentNode.connect();
|
||||
|
|
Loading…
Reference in New Issue