Skip to content

Onyx.merge('key', null) breaks subsequent merges for 'key' #425

Description

@arosiclair

Codesandbox example

Rough steps:

  1. Init onyx
  2. Merge value on 'key'
  3. Merge null on 'key'
  4. Merge another value on 'key'
  5. See that 'key' never updates

This is reproducible on the latest version (v1.0.116) and at least as early as v1.0.100

The root of the problem seems to be here where a null change removes the key from Onyx but never clears the mergeQueue for the key. Subsequent merges just continue filling the queue without ever getting processed.

cc @chrispader since you're on the blame

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions