Skip to content

Commit

Permalink
Fix error for new empty panel, fixes #337
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed Feb 1, 2017
1 parent eb23957 commit 873b57e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datasource-zabbix/datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ class ZabbixAPIDatasource {
replaceTargetVariables(target, options) {
let parts = ['group', 'host', 'application', 'item'];
parts.forEach(p => {
target[p].filter = this.replaceTemplateVars(target[p].filter, options.scopedVars);
if (target[p] && target[p].filter) {
target[p].filter = this.replaceTemplateVars(target[p].filter, options.scopedVars);
}
});
target.textFilter = this.replaceTemplateVars(target.textFilter, options.scopedVars);

Expand Down

0 comments on commit 873b57e

Please sign in to comment.