mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
withNullAsUndefined(x) -> x ?? undefined (#189987)
Follow up on #189983 Replaces `withNullAsUndefined` with uses of `??`
This commit is contained in:
@@ -15,7 +15,6 @@ import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { FileAccess, RemoteAuthorities, Schemas } from 'vs/base/common/network';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export function clearNode(node: HTMLElement): void {
|
||||
@@ -1284,7 +1283,7 @@ export function triggerUpload(): Promise<FileList | undefined> {
|
||||
|
||||
// Resolve once the input event has fired once
|
||||
event.Event.once(event.Event.fromDOMEventEmitter(input, 'input'))(() => {
|
||||
resolve(withNullAsUndefined(input.files));
|
||||
resolve(input.files ?? undefined);
|
||||
});
|
||||
|
||||
input.click();
|
||||
|
||||
Reference in New Issue
Block a user