File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/angular_devkit/core/src/virtual-fs/host Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ export class SyncDelegateHost<T extends object = {}> {
3737 let completed = false ;
3838 let result : ResultT | undefined = undefined ;
3939 let errorResult : Error | undefined = undefined ;
40- observable . subscribe ( {
41- next ( x : ResultT ) { result = x ; } ,
42- error ( err : Error ) { errorResult = err ; } ,
43- complete ( ) { completed = true ; } ,
44- } ) ;
40+ // Perf note: this is not using an observer object to avoid a performance penalty in RxJS.
41+ // See https://github.com/ReactiveX/rxjs/pull/5646 for details.
42+ observable . subscribe (
43+ ( x : ResultT ) => result = x ,
44+ ( err : Error ) => errorResult = err ,
45+ ( ) => completed = true ,
46+ ) ;
4547
4648 if ( errorResult !== undefined ) {
4749 throw errorResult ;
You can’t perform that action at this time.
0 commit comments