Error: rootStateRef.value is undefined when used with debounced #584
-
ReproductionSadly, I was not yet able to find a minimal reproducible setup. But the following steps seem to be necessary to trigger the error. Steps to reproduce the behavior
Everything works if one replaces the Expected behaviorIt just works. Actual behaviorGet the following error, not necessarily in the above code but in the other place where the store is used:
This is pointing to https://github.com/posva/pinia/blob/47c6309ba13ed68922ad9895c6bb2847a6681198/src/store.ts#L85 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Checking the code I noticed that |
Beta Was this translation helpful? Give feedback.
Checking the code I noticed that
toRef(uiStore.activeSearchQuery)
should betoRef(uiStore, 'activeSearchQuery')
. Or even bettertoRef(uiStore.$state, 'activeSearchQuery')
. Other than that I can't give you more without a boiled down reproduction 😄