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>(
183
183
// "complete".
184
184
} ) ;
185
185
186
- if ( ngDevMode && options ?. requireSync && state ( ) . kind === StateKind . NoValue ) {
186
+ if ( options ?. requireSync && state ( ) . kind === StateKind . NoValue ) {
187
187
throw new ɵRuntimeError (
188
188
ɵ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.' ,
190
191
) ;
191
192
}
192
193
@@ -205,10 +206,10 @@ export function toSignal<T, U = undefined>(
205
206
throw current . error ;
206
207
case StateKind . NoValue :
207
208
// This shouldn't really happen because the error is thrown on creation.
208
- // TODO(alxhub): use a RuntimeError when we finalize the error semantics
209
209
throw new ɵRuntimeError (
210
210
ɵ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.' ,
212
213
) ;
213
214
}
214
215
} ,
You can’t perform that action at this time.
0 commit comments