davestewart / vuex-pathify

Vue / Vuex plugin providing a unified path syntax to Vuex stores
https://davestewart.github.io/vuex-pathify
MIT License
1.37k stars 57 forks source link

Bug in sync(a.b.c|customaction) #55

Open Zireael opened 5 years ago

Zireael commented 5 years ago

Hi, not sure if I'm doing it wrong - checked source code for your sync(), but can't find an issue with my application.

Basically, when I'm using computed sync(a.b.c!customaction), the customaction does not get executed. Code example: https://6y6vqmm38n.codesandbox.io/#/helloworld codepen: https://codesandbox.io/s/6y6vqmm38n

My value in example code is declared as: background: sync("extra/visual@colours.colourBackground|customaction") I can see in vue devtools, that, when trying to modify text in input box, sync event gets emitted as such:

name:"sync"
type:"$emit"
source:"<HelloWorld>"
payload:Array[2]
0:"extra/visual@colours.customaction!"
1:"bluex"

image

The payload[0] doesn't seem to look right. It should have been $store.customaction if it's meant to be pointing to a custom action/mutation or something like that, I think?

davestewart commented 5 years ago

Hey, sorry - this issue slipped by me!

Did you get any resolve on it in the meantime?