withNullAsUndefined(x) -> x ?? undefined (#189987)

Follow up on #189983

Replaces `withNullAsUndefined` with uses of `??`
This commit is contained in:
Matt Bierner
2023-08-08 16:45:52 -07:00
committed by GitHub
parent 388d3683ea
commit 6e251255fb
86 changed files with 147 additions and 221 deletions

View File

@@ -20,7 +20,6 @@ import type * as vscode from 'vscode';
import { ExtHostCommentsShape, IMainContext, MainContext, CommentThreadChanges, CommentChanges } from './extHost.protocol';
import { ExtHostCommands } from './extHostCommands';
import { checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
import { withNullAsUndefined } from 'vs/base/common/types';
type ProviderHandle = number;
@@ -207,7 +206,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
fileComments: rangesResult.fileComments || false
};
} else {
ranges = withNullAsUndefined(rangesResult);
ranges = rangesResult ?? undefined;
}
return ranges;
}).then(ranges => {