Skip to content

Commit

Permalink
check for the undefined case (on first load)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiftahw committed Dec 8, 2024
1 parent ea0ca74 commit 0ece3dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,9 @@ export class CppProperties {
}
} else {
const compileCommandsLastChanged: Date | undefined = this.compileCommandsFileWatcherFallbackTime.get(compileCommandsFile);
if ((this.compileCommandsFile === null) || (compileCommandsLastChanged !== undefined && stats.mtime > compileCommandsLastChanged)) {
if ((this.compileCommandsFile === undefined) ||
(this.compileCommandsFile === null) ||
(compileCommandsLastChanged !== undefined && stats.mtime > compileCommandsLastChanged)) {
this.compileCommandsFileWatcherFallbackTime.set(compileCommandsFile, new Date());
this.onCompileCommandsChanged(compileCommandsFile);
this.compileCommandsFile = vscode.Uri.file(compileCommandsFile); // File created.
Expand Down

0 comments on commit 0ece3dc

Please sign in to comment.