diff --git a/apps/signal/50-bug-in-effect/src/app/app.component.ts b/apps/signal/50-bug-in-effect/src/app/app.component.ts index ec6ba09b0..4283d0105 100644 --- a/apps/signal/50-bug-in-effect/src/app/app.component.ts +++ b/apps/signal/50-bug-in-effect/src/app/app.component.ts @@ -40,13 +40,16 @@ export class AppComponent { gpu = model(false); constructor() { - /* - Explain for your junior team mate why this bug occurs ... - */ effect(() => { - if (this.drive() || this.ram() || this.gpu()) { - alert('Price increased!'); - } + if (this.drive()) alert('Price increased!'); + }); + + effect(() => { + if (this.ram()) alert('Price increased!'); + }); + + effect(() => { + if (this.gpu()) alert('Price increased!'); }); } }