salesforce / akita

🚀 State Management Tailored-Made for JS Applications
https://salesforce.github.io/akita/
Apache License 2.0
3.7k stars 342 forks source link

this.active.indexOf is not a function on removeActive #1036

Open fababracx opened 1 year ago

fababracx commented 1 year ago

Is this a regression?

No

Description

When ActiveState is set on Store, removeActive function trigger error if active key is number.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

image

Please provide the environment you discovered this bug in

No response

Anything else?

Data in store : image

Do you want to create a pull request?

No

esbakker commented 11 months ago

Any news on this? I also ran into this using akita 8.0.1.

Worked around it by extending MultiActiveState instead of ActiveState

fababracx commented 11 months ago

If you setActive with string problem is fixed.

image

And removeActive work.