Commit bfeb884d authored by Anton Tereshchenkov's avatar Anton Tereshchenkov

Default nonexistent labels in labelset to empty string

parent 82805f50
...@@ -115,7 +115,10 @@ function matchLabels(matchers, labelSet) { ...@@ -115,7 +115,10 @@ function matchLabels(matchers, labelSet) {
// Compare single matcher to labelSet // Compare single matcher to labelSet
function matchLabel(matcher, labelSet) { function matchLabel(matcher, labelSet) {
var v = labelSet[matcher.name]; var v = "";
if (matcher.name in labelSet) {
v = labelSet[matcher.name];
}
if (matcher.isRegex) { if (matcher.isRegex) {
return matcher.value.test(v) return matcher.value.test(v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment