diff options
author | Florrie <towerofnix@gmail.com> | 2019-10-14 17:14:09 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-10-14 17:14:09 -0300 |
commit | c56242c3266d1fdf83eceed532c054fba8084630 (patch) | |
tree | 0754e1a209ab32cea6f800b71ff02c7b2d6a781f /ui | |
parent | faab576e85baf787c44a67640282ba146a874ef5 (diff) |
Don't crash when getting scrollSize
Diffstat (limited to 'ui')
-rw-r--r-- | ui/form/ListScrollForm.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |