From c56242c3266d1fdf83eceed532c054fba8084630 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 14 Oct 2019 17:14:09 -0300 Subject: Don't crash when getting scrollSize --- ui/form/ListScrollForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index 38fd2a2..78c376f 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -271,7 +271,7 @@ module.exports = class ListScrollForm extends Form { // past. let size = 0 - for (let i = 0; i < this.scrollItems; i++) { + for (let i = 0; i < Math.min(this.scrollItems, this.inputs.length); i++) { if (this.layoutType === 'horizontal') { size += this.inputs[i].w } else { -- cgit 1.3.0-6-gf8a5