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

This commit is contained in:
Erik Sundell 2018-10-11 15:10:47 +02:00
parent b7599212e0
commit c84cf1f598

View File

@ -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);
}
}