File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export function injectDispatch<
5858 events : EventGroup ,
5959 config ?: { injector ?: Injector }
6060) : Prettify < InjectDispatchResult < EventGroup > > {
61- if ( ! config ?. injector ) {
61+ if ( typeof ngDevMode !== 'undefined' && ngDevMode && ! config ?. injector ) {
6262 assertInInjectionContext ( injectDispatch ) ;
6363 }
6464
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function rxMethod<Input>(
2626 generator : ( source$ : Observable < Input > ) => Observable < unknown > ,
2727 config ?: { injector ?: Injector }
2828) : RxMethod < Input > {
29- if ( ! config ?. injector ) {
29+ if ( typeof ngDevMode !== 'undefined' && ngDevMode && ! config ?. injector ) {
3030 assertInInjectionContext ( rxMethod ) ;
3131 }
3232
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export function signalMethod<Input>(
2222 processingFn : ( value : Input ) => void ,
2323 config ?: { injector ?: Injector }
2424) : SignalMethod < Input > {
25- if ( ! config ?. injector ) {
25+ if ( typeof ngDevMode !== 'undefined' && ngDevMode && ! config ?. injector ) {
2626 assertInInjectionContext ( signalMethod ) ;
2727 }
2828
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export function watchState<State extends object>(
110110 watcher : StateWatcher < State > ,
111111 config ?: { injector ?: Injector }
112112) : { destroy ( ) : void } {
113- if ( ! config ?. injector ) {
113+ if ( typeof ngDevMode !== 'undefined' && ngDevMode && ! config ?. injector ) {
114114 assertInInjectionContext ( watchState ) ;
115115 }
116116
You can’t perform that action at this time.
0 commit comments