Skip to content
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

Handle Promise rejection in guards (fix #2833) #2838

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
chore: set asyncMode default true
  • Loading branch information
oleksiikhr committed Jun 30, 2019
commit 843689dcc5a48f4d6aa2ec386220d9894bcdf3d6
6 changes: 3 additions & 3 deletions examples/error-handling/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import VueRouter from 'vue-router'
Vue.use(VueRouter)

// eslint-disable-next-line no-unused-vars
let asyncMode = false
let asyncMode = true

const makeError = (msg) => {
if (asyncMode) {
Expand Down Expand Up @@ -96,7 +96,7 @@ new Vue({
router,
data () {
return {
asyncMode: false
asyncMode
}
},
watch: {
Expand All @@ -107,7 +107,7 @@ new Vue({
template: `
<div id="app">
<h1>Error Handling</h1>
<strong @click="asyncMode = !asyncMode">
<strong @click="asyncMode = !asyncMode" style="cursor: pointer">
Open console - <code>{{ asyncMode ? 'async' : 'sync' }} (click)</code>
</strong>
<br>
Expand Down