We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that on line:
ngxs-crud-app/src/app/form/form.component.ts
Line 54 in 1b1e979
onSubmit() { if (this.editTodo) { this.formSubscription.add( this.store.dispatch(new UpdateTodo(this.todoForm.value, this.todoForm.value.id)).subscribe(() => { this.clearForm(); }) ); } else { this.formSubscription.add( this.formSubscription = this.store.dispatch(new AddTodo(this.todoForm.value)).subscribe(() => { this.clearForm(); }) ); } }
might cause an unsubscribed subscription. Accidentally, you wrote
this.formSubscription.add( this.formSubscription = this.store.dispatch(new AddTodo(this.todoForm.value)).subscribe(() => { this.clearForm(); })
while it should have been:
this.formSubscription.add( this.store.dispatch(new AddTodo(this.todoForm.value)).subscribe(() => { this.clearForm(); })
This could lead to the subscription made on the ngOnInit:
this.formSubscription.add( this.selectedTodo.subscribe(todo => { if (todo) { this.todoForm.patchValue({ id: todo.id, userId: todo.userId, title: todo.title }); this.editTodo = true; } else { this.editTodo = false; } }) );
to be removed from the formSubscription, thus this subscription won't be unsubscribed.
Please note I opened a pull request that fixes this bug
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I noticed that on line:
ngxs-crud-app/src/app/form/form.component.ts
Line 54 in 1b1e979
the function:
might cause an unsubscribed subscription. Accidentally, you wrote
while it should have been:
This could lead to the subscription made on the ngOnInit:
to be removed from the formSubscription, thus this subscription won't be unsubscribed.
Please note I opened a pull request that fixes this bug
The text was updated successfully, but these errors were encountered: