Skip to content

Commit e819f36

Browse files
authored
Fix error when rootRui is null. (#2614)
1 parent 140670c commit e819f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export class CppProperties {
264264
Object.assign(result, this.configurationJson.env);
265265
}
266266

267-
result["workspaceFolderBasename"] = path.basename(this.rootUri.fsPath);
267+
result["workspaceFolderBasename"] = this.rootUri ? path.basename(this.rootUri.fsPath) : "";
268268
return result;
269269
}
270270

0 commit comments

Comments
 (0)