Skip to content

an undefined value prevents merging (when merging 3+ objects) #460

@RebeccaStevens

Description

@RebeccaStevens

Bug Report

If one or more values are undefined, the mergeOthers route is taken.

Expected behavior

const x = { a: { b: 1 } };
const y = { a: undefined };
const z = { a: { c: 3 } };

const merged = deepmerge(x, y, z); // { a: { b: 1, c: 3 } }

Actual behavior

const x = { a: { b: 1 } };
const y = { a: undefined };
const z = { a: { c: 3 } };

const merged = deepmerge(x, y, z); // { a: z.a }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: HighAfter critical issues are fixed, these should be dealt with before any further issues.Status: ReleasedIt's now live.Type: BugInconsistencies or issues which will cause a problem for users or implementors.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions