-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
Description
In some cases, a null query parameter value does not take effect. When a query parameter has a value, and is updated to be 'null', it may not take effect.
Here is a failing unit test:
it('should not inherit previous params when new params are passed', async(done) => {
router.stateRegistry.register({
name: 'foo',
url: '?fooParam',
});
await $state.go('foo', { fooParam: 'abc' });
expect(router.globals.params).toEqualValues({ fooParam: 'abc' });
await $state.go('foo', { fooParam: undefined });
expect(router.globals.params).toEqualValues({ fooParam: null });
done();
});
FAILED transition inherited params should not inherit previous params when new params are passed
debug.js:21 Uncaught Expected StateParams({ #: null, fooParam: 'abc' }) to equal values Object({ fooParam: null }).
at Suite.<anonymous> (http://localhost:8080/base/test/index.js:20452:56)
at step (http://localhost:8080/base/test/index.js:19674:24)
at Object.next (http://localhost:8080/base/test/index.js:19655:54)
at fulfilled (http://localhost:8080/base/test/index.js:19646:59)