Skip to content

Commit c2a42d5

Browse files
committed
fix(location): dartium does not like pushState with null.
According to https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history the value of the title parameter is irrelevant anyways.
1 parent 01d5c29 commit c2a42d5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎modules/angular2/src/router/location.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class Location {
3636

3737
go(url:string) {
3838
url = this._stripBaseHref(url);
39-
this._browserLocation.pushState(null, null, url);
39+
this._browserLocation.pushState(null, '', url);
4040
}
4141

4242
forward() {

‎modules/angular2/test/router/location_spec.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export function main() {
2727

2828
it('should normalize urls on navigate', () => {
2929
location.go('/my/app/user/btford');
30-
expect(browserLocation.spy('pushState')).toHaveBeenCalledWith(null, null, '/user/btford');
30+
expect(browserLocation.spy('pushState')).toHaveBeenCalledWith(null, '', '/user/btford');
3131
});
3232

3333
it('should remove index.html from base href', () => {
3434
browserLocation.baseHref = '/my/app/index.html';
3535
location = new Location(browserLocation);
3636
location.go('/my/app/user/btford');
37-
expect(browserLocation.spy('pushState')).toHaveBeenCalledWith(null, null, '/user/btford');
37+
expect(browserLocation.spy('pushState')).toHaveBeenCalledWith(null, '', '/user/btford');
3838
});
3939

4040
it('should normalize urls on popstate', inject([AsyncTestCompleter], (async) => {

0 commit comments

Comments
 (0)