Skip to content

apply strips Date when applying changes #9

@lloydh6

Description

@lloydh6

When using apply on two objects, any property that is null on obj1 and a date in obj2 results in the returning value becoming an empty object.

Here is the code that is being run


const obj1 = {
  date: null,
  name: 'first',
};

const obj2 = {
  date: new Date(),
  name: 'first',
};

const result = apply(obj1, obj2); // Result is { date: {}, name: 'first' }

Is it by design that the result of the apply is { date: {}, name: 'first' }?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions