diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js b/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js index 86d2b58001..ee5e68a67f 100644 --- a/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js +++ b/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/observable/bindCallback.js @@ -1,7 +1,8 @@ -/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isArray,_util_isScheduler PURE_IMPORTS_END */ +/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */ import { Observable } from '../Observable'; import { AsyncSubject } from '../AsyncSubject'; import { map } from '../operators/map'; +import { canReportError } from '../util/canReportError'; import { isArray } from '../util/isArray'; import { isScheduler } from '../util/isScheduler'; export function bindCallback(callbackFunc, resultSelector, scheduler) { @@ -48,7 +49,12 @@ export function bindCallback(callbackFunc, resultSelector, scheduler) { callbackFunc.apply(context, args.concat([handler])); } catch (err) { - subject.error(err); + if (canReportError(subject)) { + subject.error(err); + } + else { + console.warn(err); + } } } return subject.subscribe(subscriber); |