From e78d59403b45d7a5b1ea4e4bdfcfbe7a2a65f77a Mon Sep 17 00:00:00 2001 From: Steve Beaver Date: Wed, 9 Aug 2017 14:19:29 -0400 Subject: [PATCH] Ensure the callback function exists before calling --- src/usr/local/www/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index 9620965db8..a9d58e7412 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -665,7 +665,7 @@ events.push(function() { var freq = ajaxspecs[ajaxidx].freq; // widget can specifify it should be called freq times around hte loop if (!ajaxmutex) { - if ((ajaxcntr % freq) === 0) { + if (((ajaxcntr % freq) === 0) && (typeof ajaxspecs[ajaxidx].callback === "function" )) { make_ajax_call(ajaxspecs[ajaxidx]); }