Skip to content

Commit 02dc3fe

Browse files
committed
Express conditional more idiomatically
1 parent 84fd6a2 commit 02dc3fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class DefaultClient implements Client {
399399
//Apply text decorations to inactive regions
400400
for (let e of editors) {
401401
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(e.document.uri.toString());
402-
if (valuePair !== undefined) {
402+
if (valuePair) {
403403
e.setDecorations(valuePair.decoration, valuePair.ranges); // VSCode clears the decorations when the text editor becomes invisible
404404
}
405405
}
@@ -653,7 +653,7 @@ class DefaultClient implements Client {
653653

654654
// Recycle the active text decorations when we receive a new set of inactive regions
655655
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(params.uri);
656-
if (valuePair !== undefined) {
656+
if (valuePair) {
657657
// Disposing of and resetting the decoration will undo previously applied text decorations
658658
valuePair.decoration.dispose();
659659
valuePair.decoration = decoration;

0 commit comments

Comments
 (0)