Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

mapValuesDeep mutates the original object if leavesOnly: false #99

Closed
lewisblackwood opened this issue Mar 17, 2021 · 1 comment
Closed

Comments

@lewisblackwood
Copy link

Hi,

Great library 👍

I found using mapValuesDeep that if the options are left at the default leavesOnly: false, then it mutates the original object. If leavesOnly: true then the original object is not mutated.

You can see an example repl.it here.

// leavesOnly: true
{ sourceData: { hello: 'world' }, mappedData: { hello: 'WORLD' } }
// leavesOnly: false
{ sourceData: { hello: 'WORLD' }, mappedData: { hello: 'WORLD' } }

Is this the expected behaviour?

@YuriGor
Copy link
Owner

YuriGor commented Mar 17, 2021

Hi, thank you for report, looks like a bug, will check in next few days.

@YuriGor YuriGor added bug Something isn't working and removed bug Something isn't working labels Mar 17, 2021
@YuriGor YuriGor closed this as completed Mar 18, 2021
Repository owner locked and limited conversation to collaborators Mar 18, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants