Skip to content

Commit dc3de65

Browse files
committed
Switches to modern syntax
1 parent 563358d commit dc3de65

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/git/models/repository.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -926,9 +926,7 @@ export class Repository implements Disposable {
926926

927927
this._updatedAt = Date.now();
928928

929-
if (this._fireChangeDebounced == null) {
930-
this._fireChangeDebounced = debounce(this.fireChangeCore.bind(this), defaultRepositoryChangeDelay);
931-
}
929+
this._fireChangeDebounced ??= debounce(this.fireChangeCore.bind(this), defaultRepositoryChangeDelay);
932930

933931
this._pendingRepoChange = this._pendingRepoChange?.with(changes) ?? new RepositoryChangeEvent(this, changes);
934932

@@ -964,17 +962,9 @@ export class Repository implements Disposable {
964962

965963
this._updatedAt = Date.now();
966964

967-
if (this._fireFileSystemChangeDebounced == null) {
968-
this._fireFileSystemChangeDebounced = debounce(
969-
this.fireFileSystemChangeCore.bind(this),
970-
this._fsChangeDelay,
971-
);
972-
}
973-
974-
if (this._pendingFileSystemChange == null) {
975-
this._pendingFileSystemChange = { repository: this, uris: [] };
976-
}
965+
this._fireFileSystemChangeDebounced ??= debounce(this.fireFileSystemChangeCore.bind(this), this._fsChangeDelay);
977966

967+
this._pendingFileSystemChange ??= { repository: this, uris: [] };
978968
const e = this._pendingFileSystemChange;
979969
e.uris.push(uri);
980970

0 commit comments

Comments
 (0)