-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Path' in Op parameter to Subscribe is non-sensical with ProxyMap #514
Comments
Thanks for reporting. |
Right now, I am just looking at the object to see if it has a 'toStringTag' Symbol of Map and if so, getting the key value pair from the data Array. However, this depends on my code understanding implementation details of ProxyMap and it really only works for the simplest case. What if I have an object inside the ProxyMap that is modified? In this case the logic will likely fall over. |
Well, based on current implementation being emulation, if you need "Op", I'd suggest to avoid using |
Closing this as it's intended. Not exactly related, but link to #567. |
When using the 'subscribe' function with the 'ProxyMap' object, the path parameter provided as part of the Op object to the callback leaks internal implementation details of ProxyMap. Specifically, the paths will start out with 'data' (which is the internal Array in ProxyMap) and an array index, which makes no sense outside the bounds of ProxyMap.
I would expect that the path returns the key within ProxyMap and any descendant attributes, etc. As an example, I have a simple ProxyMap with string keys (eg. 'abc123') and a handful of properties. When changing one of those properties (eg. 'eventStatus') I get the following path in the callback: ['data', '11', '1', 'eventStatus']. So the key 'abc123' is returned as ['data', '11', '1'] because it is the value (key 1) in the 11th key/value pair in the internal 'data' array of the ProxyMap implementation....
The text was updated successfully, but these errors were encountered: