Skip to content

updateIn doesn't properly handle notSetValue #1657

Closed
@migueloller

Description

@migueloller

What happened

updateIn doesn't properly handle notSetValue.

How to reproduce

const { updateIn } = require('immutable')
const original = { x: { y: { z: 123 } } }
const NOT_SET = { NOT_SET: true }
console.log(updateIn(original, ['x', 'y'], NOT_SET, val => NOT_SET)) // { x: { y: { NOT_SET: true } } }

Expected the log output to be { x: {} } instead. Is this intended behavior?

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