Skip to content

_.omit is deleting keys in deep omit #2912

@HeleneDroal

Description

@HeleneDroal

Hi,

Between the 4.17.2 and the 4.17.3 versions, I noticed that the _.omit function is deteriorating the object when this is in deep level.

For example :

const object1 = { a: { b: 'c' } };
const object2 = _.omit(object1, 'a.b');

console.log(object1);  // { a: {} }

Metadata

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