Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make utilities for handling tokens pure #1412

Open
jorenbroekema opened this issue Dec 12, 2024 · 0 comments
Open

Make utilities for handling tokens pure #1412

jorenbroekema opened this issue Dec 12, 2024 · 0 comments

Comments

@jorenbroekema
Copy link
Collaborator

But to make function totally pure you should use full clone instead of just shallow clone.
Because current behavior allow of update for example subproperties of token, i.e attributes, properties of object values etc.

Originally posted by @Delagen in #1397 (comment)

More context: the flattenTokens utility and the convertTokenData utility, and probably others, need to make sure to created deep clones of the input if the input is of a data type where you might accidentally be mutating the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant