mirror of
https://github.com/opnsense/core.git
synced 2026-02-18 18:18:13 -05:00
bootgrid: fix curRowCount type conversion issue when stored in localstorage.
This commit is contained in:
parent
c0569f86d5
commit
66261e1121
1 changed files with 3 additions and 1 deletions
|
|
@ -1059,7 +1059,9 @@ class UIBootgrid {
|
|||
|
||||
// Rowcount
|
||||
this.curRowCount = localStorage.getItem(`${this.persistenceID}-rowCount`) || this.options.rowCount[0];
|
||||
if (this.curRowCount === 'true') {
|
||||
if (/^\+?(0|[1-9]\d*)$/.test(this.curRowCount)) {
|
||||
this.curRowCount = parseInt(this.curRowCount);
|
||||
} else {
|
||||
this.curRowCount = true;
|
||||
}
|
||||
$(`#${this.id}-rowcount-text`).text(this.curRowCount === true ? this._translate('all') : this.curRowCount);
|
||||
|
|
|
|||
Loading…
Reference in a new issue