Skip to content

Commit 86a314d

Browse files
committed
If progress is missing a property default to 0
1 parent 2103656 commit 86a314d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/extension.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,12 @@ export function activate(context: ExtensionContext) {
516516
statusIcon.show();
517517
languageClient.onReady().then(() => {
518518
languageClient.onNotification('$cquery/progress', (args) => {
519-
let indexRequestCount = args.indexRequestCount;
520-
let doIdMapCount = args.doIdMapCount;
521-
let loadPreviousIndexCount = args.loadPreviousIndexCount;
522-
let onIdMappedCount = args.onIdMappedCount;
523-
let onIndexedCount = args.onIndexedCount;
524-
let activeThreads = args.activeThreads;
519+
let indexRequestCount = args.indexRequestCount || 0;
520+
let doIdMapCount = args.doIdMapCount || 0;
521+
let loadPreviousIndexCount = args.loadPreviousIndexCount || 0;
522+
let onIdMappedCount = args.onIdMappedCount || 0;
523+
let onIndexedCount = args.onIndexedCount || 0;
524+
let activeThreads = args.activeThreads || 0;
525525
let total = indexRequestCount + doIdMapCount +
526526
loadPreviousIndexCount + onIdMappedCount + onIndexedCount +
527527
activeThreads;

0 commit comments

Comments
 (0)