Fixed FELIX-3435 UPnP plugin doesn't play nice if the service doesn't have state variables
https://issues.apache.org/jira/browse/FELIX-3435

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1309751 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/upnp/src/main/resources/res/upnp.js b/webconsole-plugins/upnp/src/main/resources/res/upnp.js
index be7e260..9c3bdd1 100644
--- a/webconsole-plugins/upnp/src/main/resources/res/upnp.js
+++ b/webconsole-plugins/upnp/src/main/resources/res/upnp.js
@@ -125,6 +125,8 @@
 function namedObjectSorter(a,b) { return sortVarNm(a) > sortVarNm(b) ? 1 : -1 }

 function renderVars(data) {

 	serviceDataVars.empty();

+	if (typeof data.variables == 'undefined') return;

+

 	data.variables.sort(namedObjectSorter);

 	for(i in data.variables) {

 		var _var = data.variables[i];