File tree 1 file changed +3
-13
lines changed
1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -926,9 +926,7 @@ export class Repository implements Disposable {
926
926
927
927
this . _updatedAt = Date . now ( ) ;
928
928
929
- if ( this . _fireChangeDebounced == null ) {
930
- this . _fireChangeDebounced = debounce ( this . fireChangeCore . bind ( this ) , defaultRepositoryChangeDelay ) ;
931
- }
929
+ this . _fireChangeDebounced ??= debounce ( this . fireChangeCore . bind ( this ) , defaultRepositoryChangeDelay ) ;
932
930
933
931
this . _pendingRepoChange = this . _pendingRepoChange ?. with ( changes ) ?? new RepositoryChangeEvent ( this , changes ) ;
934
932
@@ -964,17 +962,9 @@ export class Repository implements Disposable {
964
962
965
963
this . _updatedAt = Date . now ( ) ;
966
964
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 ) ;
977
966
967
+ this . _pendingFileSystemChange ??= { repository : this , uris : [ ] } ;
978
968
const e = this . _pendingFileSystemChange ;
979
969
e . uris . push ( uri ) ;
980
970
You can’t perform that action at this time.
0 commit comments