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

fix(cloneDeep): Copy all properties from the source using Reflect.ownKeys() #420

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShaoClean
Copy link

@ShaoClean ShaoClean commented Aug 23, 2024

const obj = {
    a: 1,
    b: 2,
    [Symbol('1')]: 1,
};
Object.defineProperty(obj, 'c', {
    value: 3,
    enumerable: false,
});

console.log(Object.keys(obj));
// ["a", "b"]
console.log(Reflect.ownKeys(obj));
// ["a", "b", "c", Symbol(1)]

@ShaoClean ShaoClean requested a review from raon0211 as a code owner August 23, 2024 07:57
Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
es-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 7:59am

@raon0211 raon0211 changed the title fix: change get keys way fix(cloneDeep): Copy all properties from the source using Reflect.ownKeys() Aug 25, 2024
Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

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

Thanks! Seems to be much better.

@raon0211
Copy link
Collaborator

Seems that the new implementation is causing problems, let me check.

image

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