Commit 0dcd30b4 authored by Regis's avatar Regis

fix comment formatting

parent 192d003a
...@@ -27,8 +27,10 @@ ...@@ -27,8 +27,10 @@
const { totalPages, nextPage, previousPage } = this.pageInfo; const { totalPages, nextPage, previousPage } = this.pageInfo;
if (text === SPREAD) return; if (text === SPREAD) return;
// the regex here is to read if the string coming in will become a valid string /**
// had issues with parsing using `+` because `typeof NaN === 'number'` the regex here is to read if the string coming in will become a valid number
had issues with parsing using `+` because `typeof NaN === 'number'`
*/
if (/^-?[\d.]+(?:e-?\d+)?$/.test(text)) pagenum = +text; if (/^-?[\d.]+(?:e-?\d+)?$/.test(text)) pagenum = +text;
if (text === LAST) pagenum = totalPages; if (text === LAST) pagenum = totalPages;
if (text === NEXT) pagenum = nextPage; if (text === NEXT) pagenum = nextPage;
......
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