Skip to content

$state.is() is not working as expected from v0.4.0 #3300

@Pmyl

Description

@Pmyl

$state.is() when provided with the correct state and the params parameter it will wrongly return true as long as the last param matches even if the others are different.

This test should work but it fails:

it('should return false when the current state is passed with non matching parameters', inject(function ($state, $q) {
  $state.transitionTo(D, {x: 'foo', y: 'qux'});
  $q.flush();

  expect($state.is(D, {x: 'bar', y: 'qux'})).toBe(false);
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions