You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to remove a die by passing in a die roll object I get .filter() is not a method. I understand why this is happening. Internally, all the dice rolls are cached in an object, indexed by their rollId. This is so they can be easily looked up once their roll value has been calculated after the physic simulation. However, when outputting the final results, this multidimensional object is converted into an array of objects. The rolls are not an array internally, so there is no .filter method.
This has also uncovered some other issues around data mutation in this project. I'm looking into how to better manage the data internally.
The text was updated successfully, but these errors were encountered:
When attempting to remove a die by passing in a die roll object I get
.filter() is not a method
. I understand why this is happening. Internally, all the dice rolls are cached in an object, indexed by their rollId. This is so they can be easily looked up once their roll value has been calculated after the physic simulation. However, when outputting the final results, this multidimensional object is converted into an array of objects. The rolls are not an array internally, so there is no .filter method.This has also uncovered some other issues around data mutation in this project. I'm looking into how to better manage the data internally.
The text was updated successfully, but these errors were encountered: