Commit 718c65b0 authored by Robin Tissot's avatar Robin Tissot
Browse files

Fixes trying to go to invalid page.

parent e4b64917
......@@ -50,8 +50,10 @@ export default {
},
methods: {
async goTo(ev) {
await this.$store.dispatch('parts/loadPartByOrder', ev.target.value-1);
$('#gotoModal').modal('hide');
if (ev.target.value > 0 && ev.target.value <= parseInt(ev.target.attributes.max.value)) {
await this.$store.dispatch('parts/loadPartByOrder', ev.target.value-1);
$('#gotoModal').modal('hide');
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment