Merge pull request #13624 from grafana/filter-option-fix

Stackdriver: Prevent filter from crashing
pull/13651/head
Daniel Lee 7 years ago committed by GitHub
commit 09c9c2a57b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/plugins/datasource/stackdriver/filter_segments.ts

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

Loading…
Cancel
Save