Skip to content

feat: add enchanting/experimentation data#61

Open
tonydawhale wants to merge 1 commit into
mainfrom
feat/enchanting
Open

feat: add enchanting/experimentation data#61
tonydawhale wants to merge 1 commit into
mainfrom
feat/enchanting

Conversation

@tonydawhale
Copy link
Copy Markdown
Contributor

Added lodash package to deep copy. If we can think of another solution, I am down to implement that instead.

Added lodash package to deep copy. If we can think of another solution, I am down to implement that instead.
@ptlthg
Copy link
Copy Markdown
Contributor

ptlthg commented Jan 10, 2024

The built-in structuredClone() function will likely work instead of lodash here, not positive though

@tonydawhale
Copy link
Copy Markdown
Contributor Author

The built-in structuredClone() function will likely work instead of lodash here, not positive though

I believe we're using lodash in another PR (#60) so I think might end up just keeping.

return {
unlocked: !!userProfile.experimentation,
experiments: userProfile.experimentation
? Object.fromEntries(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole Object.fromEntries(...) call should be separated into a new function, it's doing way too much to be inlined like this. I know we're kinda doing the same thing elsewhere already, but we should probably be more strict with things like this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants