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 = {}> {
37
37
let completed = false ;
38
38
let result : ResultT | undefined = undefined ;
39
39
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
+ ) ;
45
47
46
48
if ( errorResult !== undefined ) {
47
49
throw errorResult ;
You can’t perform that action at this time.
0 commit comments