mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
bootgrid: safeguard replace function
(cherry picked from commit 195667f1aa)
This commit is contained in:
parent
04aa6f34ad
commit
f50f13ff1c
1 changed files with 4 additions and 0 deletions
|
|
@ -2244,6 +2244,10 @@ class UIBootgrid {
|
|||
}
|
||||
|
||||
replace(rows) {
|
||||
if (!Array.isArray(rows) || rows.length === 0) {
|
||||
throw new Error('Cannot replace without data. Use clear() to clear data, or reload() to refresh');
|
||||
}
|
||||
|
||||
this.table.replaceData(rows);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue