Author: vvalchev
Date: Thu Apr 5 11:07:18 2012
New Revision: 1309751
URL: http://svn.apache.org/viewvc?rev=1309751&view=rev
Log:
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
Modified:
felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js
Modified: felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js
URL:
http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js?rev=1309751&r1=1309750&r2=1309751&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js
(original)
+++ felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js Thu Apr
5 11:07:18 2012
@@ -125,6 +125,8 @@ function sortVarNm(a) { return typeof a
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];