Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
fix: load proposal on page load
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Oct 28, 2019
1 parent 3245e5a commit ee59f62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"e2e:open": "cypress open",
"e2e:server": "NODE_TEST=1 npm run dev",
"e2e:test": "cypress run",
"e2e": "npm run migrate && npm run e2e:server"
"e2e": "npm run e2e:migrate && npm run e2e:server"
},
"precommit": "npm run lint",
"dependencies": {
Expand Down
22 changes: 16 additions & 6 deletions pages/proposal/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,19 @@ export default {
message: 'Not found'
})
}
loader(this.id)
.then((isDraft) => {
if (isDraft !== true) {
this.disabled = true
}
})
const waitForAuth = setInterval(() => {
if (!this.$store.state.authProcessDone) {
return
}
clearInterval(waitForAuth)
loader(this.id)
.then((isDraft) => {
if (isDraft !== true) {
this.disabled = true
}
})
}, 200)
}
},
validate ({ params }) {
Expand Down Expand Up @@ -260,6 +267,9 @@ export default {
}
this.init()
}
},
skip () {
return !this.$store.state.authProcessDone
}
}
},
Expand Down

0 comments on commit ee59f62

Please sign in to comment.