Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f80a6e

Browse files
Fix null exception in setting change detection
Since `cwd` can be `undefined` we need to use optional chaining.
1 parent 14c7d4a commit 5f80a6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/session.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ export class SessionManager implements Middleware {
424424

425425
// Detect any setting changes that would affect the session
426426
if (!this.suppressRestartPrompt &&
427-
(settings.cwd.toLowerCase() !==
428-
this.sessionSettings.cwd.toLowerCase() ||
427+
(settings.cwd?.toLowerCase() !==
428+
this.sessionSettings.cwd?.toLowerCase() ||
429429
settings.powerShellDefaultVersion.toLowerCase() !==
430430
this.sessionSettings.powerShellDefaultVersion.toLowerCase() ||
431431
settings.developer.editorServicesLogLevel.toLowerCase() !==

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /