File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 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 {
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
You can’t perform that action at this time.
0 commit comments