Skip to content

Commit b6c93b5

Browse files
committed
fix(UISrefActive): Fix state info deregister function
1 parent 0740825 commit b6c93b5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/components/UISrefActive.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ export class UISrefActive extends Component<IProps,any> {
5454

5555
addStateInfo = (stateName, stateParams) => {
5656
const activeClass = this.props.class;
57-
// if the class props is an object we already got explicit states
58-
// provided by UISrefActive components, so we shadow the one
59-
// coming from UISref
60-
if (typeof activeClass === 'object' && this.states.length > 0) return;
6157
let deregister = this.addState(stateName, stateParams, activeClass);
6258
this.forceUpdate();
6359
return deregister;
@@ -77,7 +73,7 @@ export class UISrefActive extends Component<IProps,any> {
7773
this.states.push(stateInfo);
7874
this.activeClasses[stateHash] = activeClass;
7975
return () => {
80-
let idx = state.indexOf(stateInfo);
76+
let idx = this.states.indexOf(stateInfo);
8177
if (idx !== -1) this.states.splice(idx, 1);
8278
}
8379
}

0 commit comments

Comments
 (0)