Commit f0a72fc3 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak 1️⃣
Browse files

fix(telemetry): Assure code suggestion telemetry state manager exists

If code suggestion telemetry manger does not exists it will crash code suggestions,
this commit fixes case when it could be undefined
parent 492ef83d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ export class CodeSuggestionsTelemetryManager {
  }

  static rejectOpenedSuggestions() {
    if (!this.instance) {
      this.instance = new CodeSuggestionsTelemetryManager();
    }
    log.debug(`Telemetry: Reject all opened suggestions`);

    this.instance.suggestions.forEach((suggestion, suggestionID) => {