Skip to content

Fix _extend fn - alter provided object#286

Merged
terehov merged 1 commit intofullstack-build:developmentfrom
jakubhruby:master
Jun 8, 2024
Merged

Fix _extend fn - alter provided object#286
terehov merged 1 commit intofullstack-build:developmentfrom
jakubhruby:master

Conversation

@jakubhruby
Copy link
Contributor

Fixes #285

// Don't do anything if add isn't an object
if (!add || !isObject(add)) return origin;

const clonedOrigin = { ...origin } as { [key: string]: unknown };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was not needed - it lived just in this method

clonedOrigin[keys[i]] = clonedAdd[keys[i]];
origin[keys[i]] = clonedAdd[keys[i]];
}
return origin;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Passed object was returned with no change

@terehov terehov changed the base branch from master to development June 8, 2024 11:54
@terehov terehov merged commit 7e47b61 into fullstack-build:development Jun 8, 2024
@terehov
Copy link
Contributor

terehov commented Jun 8, 2024

Thank you. I have released an update with your changes 👍

@jakubhruby
Copy link
Contributor Author

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.

Bug: Only a few levels are printed in pretty mode

2 participants