-
Notifications
You must be signed in to change notification settings - Fork 85
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
updateField doesn't support broken paths #52
Comments
Hey @fusionbeam! This seems to be the same as #41 (I know, the title is a bit misleading I guess) Pull requests are welcome! I'll close this issue, please use #41 for further discussion of the topic. Please let me know if I miss understood your problem and I'll reopen this. Thanks! |
@maoberlehner technically this is different but I can see how working on a fix for #41 can include a fix for this use case as well. |
I have to map an object with a two level depth of nested dynamic properties.
i.e. myContainer.$category.$name.value
I am calling commit('updateField', {path:
myContainer.${category}.${name}
, value:metric.value});If $category has never been set separately this break with an error 'Cannot set property ... of null'.
This should be an easy fix, to ensure path safety by creating empty objects if the key doesn't exist already.
The text was updated successfully, but these errors were encountered: