stackdriver: check if array is empty to prevent filter from crashing. This closes #13607

(cherry picked from commit c84cf1f598)
This commit is contained in:
Erik Sundell
2018-10-15 13:56:42 +02:00
committed by Marcus Efraimsson
parent 2af0292329
commit 19df00e2d4
@@ -87,7 +87,7 @@ export class FilterSegments {
}
// remove condition if it is first segment
if (index === 0 && this.filterSegments[0].type === 'condition') {
if (index === 0 && this.filterSegments.length > 0 && this.filterSegments[0].type === 'condition') {
this.filterSegments.splice(0, 1);
}
}