Onyx.merge('key', null) breaks subsequent merges for 'key'
arosiclair opened this issue ยท 8 comments
Rough steps:
- Init onyx
- Merge value on 'key'
- Merge
null
on 'key' - Merge another value on 'key'
- 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
Looks like this was introduced in v1.0.99 from this PR. cc @tgolen @neil-marcellini
Thanks for digging into this and finding a problem @arosiclair. Let's be sure to start off with writing a test that reproduces the bug. @chrispader can you please look into this?
Yes, going to look into this either today or tomorrow! cc @arosiclair @tgolen
@arosiclair @tgolen @neil-marcellini just created a PR that fixes this issue and adds a new test ๐
Just merged it thanks for putting a fix out quickly!
@chrispader can you also post a PR to bump our version of Onyx in NewDot?
@chrispader can you also post a PR to bump our version of Onyx in NewDot?
yes, will do ๐
This is all set!