-
Notifications
You must be signed in to change notification settings - Fork 57
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
collision between object path and serialization #138
Comments
Hey @Heziode, Thanks for digging in and going over the code :) The vuex-pathify/src/services/resolver.js Line 107 in 9a35375
The https://github.com/davestewart/vuex-pathify/blob/master/src/classes/Payload.js#L25 So generally, unless your paths have a Does that answer your question? Re. 1.5.1, yes, I need to publish 1.5.1! Thanks for spotting. Will do that now. |
The problem with POJO is that it becomes impossible to distinguish between a call to |
OK. Not 100% sure what the problem is, as I haven't tested a serialisation. If you want to create and post a sample repo, that would be useful. |
@davestewart take a look at the following repository: https://github.com/Heziode/vuex-pathify-serialization-multi-tab The main reason in my case to be able to distinguish POJO of vuex-pathify and POJO of serialization is to be able to do some work if the orchestrator is Vuex-Pathify (sync the store with a backend) |
Thanks! I can't promise to look at it today, but let me try in the next couple of days. Do you have any ideas to solve the problem (which I don't understand yet!) ? |
The solution would be to use the Payload class in any cases. Like this it will be very trivial to detect if the change is orchestrated by vuex-pathify or something else (including serialization). I do not analyzed the whole code of the lib, so I don’t know if it can be convenient to do this. |
So if we took that approach, you're basically saying:
? I can't remember how everything is put together TBH but I'll dig in again in the next few days. Do the changes you pushed for solve the serialisation aim, or is this additional work needed to completely solve it? |
Right, this is what I mean.
#125 cover a big part of the serialisation problem but not the not the problem raised here. So additional work is needed to cover this case. |
vuex-pathify/src/services/store.js
Lines 23 to 25 in 9a35375
The above code create non Payload object for "root path", like the following example:
If I call
$store.set("global/something", false)
, the Payload will be a simple object (like serialized object) and not a Payload instance.Is there anything in particular to avoid using a Payload for the root path?
nb @davestewart : you did not push tags not the repo, and you did not release
1.5.1
on NPM.I know that you are very busy, so, stay in shape 💪
The text was updated successfully, but these errors were encountered: