variable data contamination #4272
Unanswered
TerrePorter
asked this question in
5. Bugs
Replies: 2 comments 4 replies
-
this is how javascript work, |
Beta Was this translation helpful? Give feedback.
1 reply
-
It wasn't mentioned how to resolve this, but the simplest would be Otherwise |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I seem to be having some data contamination.
I've created a test page, but I was unable to get codepin to run it as Alpine seems to be problematic there.
What happens is when you click the add button, it adds a random number to the array. When you click the reset button it resets the array to the other array, aka the defaults.
My problem is when I click the add button a few times, then click the reset button the two arrays become synced and the add button adds to both arrays even when the second array is never called.
Beta Was this translation helpful? Give feedback.
All reactions