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).

This commit is contained in:
jim-p 2011-09-13 13:56:30 -04:00
parent d3ce6a8be3
commit 2100a4542e

View File

@ -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;