-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
enhanceApp does not always await all promises on page refresh #2074
Closed
1 task done
staghouse opened this issue
Dec 9, 2019
· 2 comments
· Fixed by #2075 · May be fixed by adamlaska/osmos-cosmos-sdk#5
Closed
1 task done
enhanceApp does not always await all promises on page refresh #2074
staghouse opened this issue
Dec 9, 2019
· 2 comments
· Fixed by #2075 · May be fixed by adamlaska/osmos-cosmos-sdk#5
Labels
Comments
Currently, enhanceApp does not handle async functions: vuepress/packages/@vuepress/core/lib/client/app.js Lines 93 to 97 in c2bd6de
Maybe something like this, or use appEnhancers.forEach(async enhancer => {
if (typeof enhancer === 'function') {
await enhancer({ Vue, options, router, siteData, isServer })
}
}) |
As a note, I have tried Promise.all as well, with some variation in consistency: Either all promises resolve, or none. Edit: Both in enhanceApp.js and in app.js |
meteorlxy
added a commit
to meteorlxy/vuepress
that referenced
this issue
Dec 9, 2019
18 tasks
meteorlxy
added a commit
that referenced
this issue
Feb 2, 2020
larionov
pushed a commit
to larionov/vuepress
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
Steps to reproduce
Vue.prototype.myPromisedData = await myPromiseFunction()
, though it doesnt matter if its a function or try/catch with storage on successthis.myPromisedData
in a componentWhat is expected?
this.myPromisedData
should always return what data is expectedWhat is actually happening?
The data returns undefined/promise pending/sometimes loads/only returns some promises. Its all wildly inconsistent other than the first promise returned has a higher chance of returning valid.
This seems to be a local-only issue as it does not happen on my production server. Could it be related to the HMR?
Other relevant information
npx vuepress info
in my VuePress project:The text was updated successfully, but these errors were encountered: