ckeditor / ckeditor5-angular

Official CKEditor 5 Angular 5+ component.
https://ckeditor.com/ckeditor-5
Other
205 stars 111 forks source link

Do not run change detection if `error` does not have observers #371

Closed arturovt closed 1 year ago

arturovt commented 1 year ago

Suggested merge commit message (convention)

Fix: Do not run change detection if error does not have observers.

The ngZone.run is used to re-enter the Angular zone and notify that something may have potentially changed to force Angular to run change detection. The change detection is considered as no-op change detection; basically tick() has run but nothing has changed. There's no reason to trigger ngZone.run when developers are not listening to the error event in their code.


Additional information

For example – encountered issues, assumptions you had to make, other affected tickets, etc.

Witoso commented 1 year ago

Thanks for the contribution! Have you signed the CLA?

arturovt commented 1 year ago

Yeah, I received and email and went through the form

Witoso commented 1 year ago

@vokiel could you check?

vokiel commented 1 year ago

Fixed :+1:

pomek commented 1 year ago

@arturovt, thanks for the PR. Could you please add a test that covers the change? I am not sure if I understood it correctly and such could help. Also, it prevents introducing a regression in the future.

arturovt commented 1 year ago

@pomek updated

pomek commented 1 year ago

Thanks @arturovt for the PR. It will be included in the upcoming release that should happen this week.