Skip to content

Commit f58d3b8

Browse files
committed
Remove some useless safe navigators
1 parent 80a91c7 commit f58d3b8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

server/src/Providers/DiagnosticsProvider.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class DiagnoticsProvider extends Provider {
7979

8080
if (!this.server.configLoaded || !document) {
8181
if (!this.server.documentsWaitingForPublish.includes(uri)) {
82-
this.server.documentsWaitingForPublish?.push(uri);
82+
this.server.documentsWaitingForPublish.push(uri);
8383
}
8484
return resolve(true);
8585
}
@@ -88,7 +88,7 @@ export default class DiagnoticsProvider extends Provider {
8888
const files: FilesDiagnostics = { [document.uri]: [] };
8989
const uris: string[] = [];
9090
children.forEach((child) => {
91-
const fileUri = this.server.documentsCollection?.get(child)?.uri;
91+
const fileUri = this.server.documentsCollection.get(child)?.uri;
9292
if (fileUri) {
9393
files[fileUri] = [];
9494
uris.push(fileUri);
@@ -168,13 +168,9 @@ export default class DiagnoticsProvider extends Provider {
168168

169169
if (line.includes("Could not locate")) {
170170
if (Boolean(nwnHome) || Boolean(nwnInstallation)) {
171-
return this.server.logger.error(
172-
"Unable to resolve provided Neverwinter Nights home and/or installation directories. Ensure the paths are valid in the extension settings.",
173-
);
171+
return this.server.logger.error("Unable to resolve provided Neverwinter Nights home and/or installation directories. Ensure the paths are valid in the extension settings.");
174172
} else {
175-
return this.server.logger.error(
176-
"Unable to automatically resolve Neverwinter Nights home and/or installation directories.",
177-
);
173+
return this.server.logger.error("Unable to automatically resolve Neverwinter Nights home and/or installation directories.");
178174
}
179175
}
180176
});

0 commit comments

Comments
 (0)