You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an object is overwritten with a new object of the same id, both incoming and existing are ref objects with the same value, so readField will return the same value for both incoming and existing refs. The Discord user reported this to be the value of existing, in my reproduction it's the value of incoming.
This doesn't seem something that can easily be fixed and would either require a different kind of ref, or an api change (readExistingField? 😒 ).
Not sure what exactly the plan should be here, but I thought I'd create an issue so we can track it, as this seems like a valid use case.
Encountered this today, and only found this after a couple of hours of debugging and googling. Given that existing and incoming are named they way they are it's very confusing to not be able to access the old data via existing.
Issue Description
This came up here on Discord:
If an object is overwritten with a new object of the same id, both
incoming
andexisting
areref
objects with the same value, soreadField
will return the same value for bothincoming
andexisting
refs. The Discord user reported this to be the value ofexisting
, in my reproduction it's the value ofincoming
.This doesn't seem something that can easily be fixed and would either require a different kind of
ref
, or an api change (readExistingField
? 😒 ).Not sure what exactly the plan should be here, but I thought I'd create an issue so we can track it, as this seems like a valid use case.
Link to Reproduction
41b4c45
Reproduction Steps
See the test.
The text was updated successfully, but these errors were encountered: