-
Notifications
You must be signed in to change notification settings - Fork 66
[3.5.0] Bug when no data
or asyncComputed
properties are provided
#50
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
Comments
@foxbenjaminfox |
Yes, I added a test case, and surprisingly it passes, which means that something more is going on. I've been trying to replicate the problem in Medusa itself, but I havn't managed yet. You probably are in a better position than me to understand the interaction of the various interactions of the internals there. That said, I think the root of the problem is this |
We almost immediately pushed a revert of that update, and the issue was only on the
Thanks! Returning an empty object unconditionally does seem to fix the issue. |
So, I commented out this line: |
That behavior was unexpected. We use the patched version (now 3.5.0) in a project with several hundred components (including functional components, components without data, ...) and Vuex + VueRouter. We did not encounter this issue there. Removing this line only makes you seem to fix the problem. In fact, vue-async-computed is just suppressing this warning on all components on which it is enabled. In L37 there should be a test added that warns if optionsData is not a function. |
I took
This probably explains why this surfaces only in |
Very well then, I have my answer -
Yeah sorry, the project is a Python backend and the frontend is in transition to Vue, and the |
A bug introduced in version 3.5.0 (most recent) breaks components that do not contain a
data
property and/or anasyncComputed
property.Meaning, if I have a component definition containing something like:
It throws these errors:
1.
Adding either an empty (at the very least)
data
property, or anasyncComputed
property with at least one async computed property, seems to fix the issue:Tagging @michaelzangl as this seems to be related to #45.
The text was updated successfully, but these errors were encountered: