Skip to content

Commit

Permalink
fixed a broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
llali committed Dec 9, 2016
1 parent 448db69 commit 2359212
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/controllers/connectionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,12 @@ export default class ConnectionManager {
if (connection !== undefined) {
connection.intelliSenseTimer.end();
let duration = connection.intelliSenseTimer.getDuration();
let document = this.vscodeWrapper.activeTextEditor.document;
let numberOfCharacters = document.getText().length;
let numberOfCharacters: number = 0;
if (this.vscodeWrapper.activeTextEditor !== undefined
&& this.vscodeWrapper.activeTextEditor.document !== undefined) {
let document = this.vscodeWrapper.activeTextEditor.document;
numberOfCharacters = document.getText().length;
}
Telemetry.sendTelemetryEvent('IntelliSenseActivated',
{
isAzure: connection.serverInfo && connection.serverInfo.isCloud ? '1' : '0'},
Expand Down

0 comments on commit 2359212

Please sign in to comment.