Skip to content

Empty object value in create does not override factory default #25

@serhalp

Description

@serhalp

Given this factory:

const fact = unionized.factory({foo: {bar: 3}})

Creating an object like so:

fact.create({foo: {}})

The expected output object is

{
  "foo": {}
}

but the result is

{
  "foo": {
    "bar": 3
  }
}

This works as expected with {foo: null} and {foo: undefined}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions