From e72811cb2d7037e1343a1321176132c6750c1ba0 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 16 Jul 2015 18:38:42 +0300 Subject: [PATCH] iss #45 - Some additional checks for getGroupByName(), getHostByName() and getAppByName() methods. --- zabbix/zabbixAPIWrapper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zabbix/zabbixAPIWrapper.js b/zabbix/zabbixAPIWrapper.js index 78be787..1e7d23e 100644 --- a/zabbix/zabbixAPIWrapper.js +++ b/zabbix/zabbixAPIWrapper.js @@ -339,7 +339,7 @@ function (angular, _) { var params = { output: ['name'] }; - if (group[0] !== '*') { + if (group && group[0] !== '*') { params.filter = { name: group }; @@ -374,7 +374,7 @@ function (angular, _) { var params = { output: ['host', 'name'] }; - if (hostnames[0] !== '*') { + if (hostnames && hostnames[0] !== '*') { params.filter = { name: hostnames }; @@ -392,7 +392,7 @@ function (angular, _) { var params = { output: ['name'] }; - if (application[0] !== '*') { + if (application && application[0] !== '*') { params.filter = { name: application };