Commit 4dd82e1d authored by Regis's avatar Regis

fix changepage logic

parent cdbbce17
......@@ -37,9 +37,9 @@
},
changepage(event, last) {
const text = event.target.innerText;
if (typeof +text === 'number') this.pagenum = +text;
if (typeof text === 'number') this.pagenum = +text;
if (text === 'Last »') this.pagenum = last;
if (text === 'Next') this.pagnum = +this.pagenum + 1;
if (text === 'Next') this.pagenum = +this.pagenum + 1;
if (text === 'Prev') this.pagenum = +this.pagenum - 1;
window.history.pushState({}, null, `?p=${this.pagenum}`);
......
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