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', () => {
|
it('should be a plain object if no side navigation node matches the current location', () => {
|
||||||
location.urlSubject.next('g');
|
location.urlSubject.next('g?search=moo#anchor-1');
|
||||||
expect(currentNode).toEqual({
|
expect(currentNode).toEqual({
|
||||||
url: 'g',
|
url: 'g',
|
||||||
view: '',
|
view: '',
|
||||||
|
@ -95,7 +95,7 @@ export class NavigationService {
|
|||||||
(navMap, url) => {
|
(navMap, url) => {
|
||||||
let urlKey = cleanUrl(url);
|
let urlKey = cleanUrl(url);
|
||||||
urlKey = urlKey.startsWith('api/') ? 'api' : urlKey;
|
urlKey = urlKey.startsWith('api/') ? 'api' : urlKey;
|
||||||
return navMap[urlKey] || { view: '', url, nodes: [] };
|
return navMap[urlKey] || { view: '', url: urlKey, nodes: [] };
|
||||||
})
|
})
|
||||||
.publishReplay(1);
|
.publishReplay(1);
|
||||||
currentNode.connect();
|
currentNode.connect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user