File tree 3 files changed +11
-3
lines changed
packages/core/primitives/signals/src
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ const COMPUTED_NODE = /* @__PURE__ */ (() => {
133
133
producerRecomputeValue ( node : ComputedNode < unknown > ) : void {
134
134
if ( node . value === COMPUTING ) {
135
135
// Our computation somehow led to a cyclic read of itself.
136
- throw new Error ( 'Detected cycle in computations.' ) ;
136
+ throw new Error (
137
+ typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '' ,
138
+ ) ;
137
139
}
138
140
139
141
const oldValue = node . value ;
Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ export const LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {
137
137
producerRecomputeValue ( node : LinkedSignalNode < unknown , unknown > ) : void {
138
138
if ( node . value === COMPUTING ) {
139
139
// Our computation somehow led to a cyclic read of itself.
140
- throw new Error ( 'Detected cycle in computations.' ) ;
140
+ throw new Error (
141
+ typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '' ,
142
+ ) ;
141
143
}
142
144
143
145
const oldValue = node . value ;
Original file line number Diff line number Diff line change @@ -99,7 +99,11 @@ export function createWatch(
99
99
}
100
100
101
101
if ( isInNotificationPhase ( ) ) {
102
- throw new Error ( `Schedulers cannot synchronously execute watches while scheduling.` ) ;
102
+ throw new Error (
103
+ typeof ngDevMode !== 'undefined' && ngDevMode
104
+ ? 'Schedulers cannot synchronously execute watches while scheduling.'
105
+ : '' ,
106
+ ) ;
103
107
}
104
108
105
109
node . dirty = false ;
You can’t perform that action at this time.
0 commit comments