Skip to content

Make utilities for handling tokens pure #1412

Open
@jorenbroekema

Description

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.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions