summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
authorPavel Vomacka <pvomacka@redhat.com>2016-07-26 09:48:32 +0200
committerPetr Vobornik <pvoborni@redhat.com>2016-11-10 18:58:38 +0100
commit4af31c70c57fc223920b71fedfb40d1de27622b2 (patch)
tree8f6ffe436ac869229e20aa86fb710e83ea00c009 /install/ui/src/freeipa
parentcad9f9b682d9bcc33fdfb1112e4cfb1a2c66a498 (diff)
downloadfreeipa-4af31c70c57fc223920b71fedfb40d1de27622b2.tar.gz
freeipa-4af31c70c57fc223920b71fedfb40d1de27622b2.tar.xz
freeipa-4af31c70c57fc223920b71fedfb40d1de27622b2.zip
Coverity - iterating over variable which could be null
Change condition to check also variable which could be null. Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/widgets/APIBrowserWidget.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/install/ui/src/freeipa/widgets/APIBrowserWidget.js b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
index 50c2989fc..18773536d 100644
--- a/install/ui/src/freeipa/widgets/APIBrowserWidget.js
+++ b/install/ui/src/freeipa/widgets/APIBrowserWidget.js
@@ -135,7 +135,7 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
groups = this._get_params(parts[0]);
}
- if (filter) {
+ if (filter && groups) {
filter = filter.toLowerCase();
var new_groups = [];
for (var i=0,l=groups.length; i<l; i++) {
@@ -153,10 +153,10 @@ widgets.APIBrowserWidget = declare([Stateful, Evented], {
new_groups.push(groups[i]);
}
}
- return new_groups;
- } else {
- return groups;
+ groups = new_groups;
}
+
+ return groups;
},
/**