Skip to content

Commit ee426c6

Browse files
cexbrayatdevversion
authored andcommitted
fix(core): allow signal write error (angular#57973)
Now that effects allow to write to signals (see angular@4e890cc), the SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT error is only thrown in `computed` functions. This commit updates the error message to remove the mention of effects and of the deprecated `allowSignalWrites` option. PR Close angular#57973
1 parent 9213216 commit ee426c6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/application/application_ref.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ export function publishSignalConfiguration(): void {
7171
setThrowInvalidWriteToSignalError(() => {
7272
throw new RuntimeError(
7373
RuntimeErrorCode.SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT,
74-
ngDevMode &&
75-
'Writing to signals is not allowed in a `computed` or an `effect` by default. ' +
76-
'Use `allowSignalWrites` in the `CreateEffectOptions` to enable this inside effects.',
74+
ngDevMode && 'Writing to signals is not allowed in a `computed`.',
7775
);
7876
});
7977
}

0 commit comments

Comments
 (0)