svghmi/svghmi.js
branchsvghmi
changeset 2960 5ad82541b46e
parent 2951 506fe9272660
child 2970 4a9b0df0602a
--- a/svghmi/svghmi.js	Wed May 13 18:27:26 2020 +0200
+++ b/svghmi/svghmi.js	Wed May 13 18:47:09 2020 +0200
@@ -207,9 +207,11 @@
         let new_period = 0;
         if(widgets.size > 0) {
             let maxfreq = 0;
-            for(let widget of widgets)
-                if(maxfreq < widget.frequency)
-                    maxfreq = widget.frequency;
+            for(let widget of widgets){
+                let wf = widget.frequency;
+                if(wf != undefined && maxfreq < wf)
+                    maxfreq = wf;
+            }
 
             if(maxfreq != 0)
                 new_period = 1000/maxfreq;