Skip to content

Commit

Permalink
Protect the UI from getting stuck when no tags are associated with a …
Browse files Browse the repository at this point in the history
…query.
  • Loading branch information
oozie committed Mar 29, 2015
1 parent 684ff52 commit 402ba24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tsd/client/QueryUi.java
Expand Up @@ -956,9 +956,11 @@ public void got(final JSONValue json) {
}
final MetricForm metric = (MetricForm) widget;
final JSONArray tags = etags.get(i).isArray();
final int ntags = tags.size();
for (int j = 0; j < ntags; j++) {
metric.autoSuggestTag(tags.get(j).isString().stringValue());
// Skip if no tags were associated with the query.
if (null != tags) {
for (int j = 0; j < tags.size(); j++) {
metric.autoSuggestTag(tags.get(j).isString().stringValue());
}
}
}
}
Expand Down

0 comments on commit 402ba24

Please sign in to comment.