From ecd4a7ee0c6670a5e33fea51ee9722b9ca8758f4 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Sun, 1 Oct 2023 00:50:28 +0200 Subject: [PATCH] Slider: Assign empty function to cb if undefined --- modules/Slider.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/Slider.js b/modules/Slider.js index 0dabd966e..5181e4c83 100644 --- a/modules/Slider.js +++ b/modules/Slider.js @@ -4,6 +4,8 @@ try { // for making it possiblie to run the test app in the following catch stat const R = Bangle.appRect; + if (!cb) cb = ()=>{}; + let o = {}; o.v = {}; // variables go here. o.f = {}; // functions go here.