From 27c7e362d1f6719af0d2c47b815b23d648d699a6 Mon Sep 17 00:00:00 2001 From: Florrie Date: Thu, 18 Jul 2019 23:28:29 -0300 Subject: Don't explode when no element is selected! --- ui/form/ListScrollForm.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui') diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index 64214ab..38fd2a2 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -148,6 +148,10 @@ module.exports = class ListScrollForm extends Form { scrollSelectedElementIntoView() { const sel = this.inputs[this.curIndex] + if (!sel) { + return + } + let formEdge if (this.layoutType === 'horizontal') { formEdge = this.contentW -- cgit 1.3.0-6-gf8a5