From 2100a4542e924df509a8ca8a43116a448ffa61ca Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 13 Sep 2011 13:56:30 -0400 Subject: [PATCH] Check if a widget is null before testing a property. Fixes skipped updates on certain widgets (like the gateway widget) if someone doesn't have the cpu widget file on their fs (which a clean install does not). --- usr/local/www/javascript/index/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/www/javascript/index/ajax.js b/usr/local/www/javascript/index/ajax.js index b18e12f6bd..5b184803eb 100644 --- a/usr/local/www/javascript/index/ajax.js +++ b/usr/local/www/javascript/index/ajax.js @@ -141,7 +141,7 @@ function updateInterfaces(x){ function widgetActive(x) { var widget = $(x + '-container'); - if (widget.style.display != "none") + if ((widget != null) && (widget.style.display != "none")) return true; else return false;