Skip to content

Commit

Permalink
Merge pull request #457 from ckeditor/ck/6775
Browse files Browse the repository at this point in the history
Feature: Print editor errors in console if there is no (error) observer.
  • Loading branch information
Mati365 authored Nov 13, 2024
2 parents 2833d50 + f6690d9 commit ac93387
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ckeditor/ckeditor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ export class CKEditorComponent<TEditor extends Editor = Editor> implements After
// `<ckeditor (error)="onError(...)"></ckeditor>`.
if ( hasObservers( this.error ) ) {
this.ngZone.run( () => this.error.emit( e ) );
} else {
// Print error to the console when there are no subscribers to the `error` event.
console.error( e );
}
};
const element = document.createElement( this.tagName );
Expand Down

0 comments on commit ac93387

Please sign in to comment.