Skip to content

Commit

Permalink
fix(PostsControls): fix "specific page" prompt not allowing the numbe…
Browse files Browse the repository at this point in the history
…r "0"
  • Loading branch information
AlejandroAkbal committed Oct 3, 2021
1 parent f9d4a0b commit c27034c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/pages/posts/navigation/page/PostsControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ export default {
async getSpecificPage() {
const specificPage = Number.parseInt(
prompt('What page do you want to go to?')
prompt('What page do you want to go to?'),
10
)
if (!specificPage) {
if (isNaN(specificPage)) {
alert('Wrong input, only numbers please.')
return
}
Expand Down

0 comments on commit c27034c

Please sign in to comment.