Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
- Create enhanceApp.js
- Add 1 or more Promises
- Store promises in Vue.prototype, siteData, etc, for example,
Vue.prototype.myPromisedData = await myPromiseFunction()
, though it doesnt matter if its a function or try/catch with storage on success - Retrieve, for example,
this.myPromisedData
in a component
What is expected?
this.myPromisedData
should always return what data is expected
What 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
- Output of
npx vuepress info
in my VuePress project:
System:
OS: macOS 10.15.1
CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
Binaries:
Node: 12.8.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.10.2 - /usr/local/bin/npm
Browsers:
Chrome: 78.0.3904.108
Firefox: 71.0
Safari: 13.0.3
npmPackages:
@vuepress/core: 1.0.3
@vuepress/theme-default: 1.0.3
vuepress: ^1.0.3 => 1.0.3
npmGlobalPackages:
vuepress: Not Found