File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/core/rxjs-interop/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -183,10 +183,11 @@ export function toSignal<T, U = undefined>(
183183 // "complete".
184184 } ) ;
185185
186- if ( ngDevMode && options ?. requireSync && state ( ) . kind === StateKind . NoValue ) {
186+ if ( options ?. requireSync && state ( ) . kind === StateKind . NoValue ) {
187187 throw new ɵRuntimeError (
188188 ɵRuntimeErrorCode . REQUIRE_SYNC_WITHOUT_SYNC_EMIT ,
189- '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.' ,
189+ ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
190+ '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.' ,
190191 ) ;
191192 }
192193
@@ -205,10 +206,10 @@ export function toSignal<T, U = undefined>(
205206 throw current . error ;
206207 case StateKind . NoValue :
207208 // This shouldn't really happen because the error is thrown on creation.
208- // TODO(alxhub): use a RuntimeError when we finalize the error semantics
209209 throw new ɵRuntimeError (
210210 ɵRuntimeErrorCode . REQUIRE_SYNC_WITHOUT_SYNC_EMIT ,
211- '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.' ,
211+ ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
212+ '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.' ,
212213 ) ;
213214 }
214215 } ,
You can’t perform that action at this time.
0 commit comments