Skip to content

Commit

Permalink
chore: throw error if editor not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Feb 7, 2021
1 parent 2b0e969 commit bae942d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/modules/menu/floating-menu/floating-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ export class FloatingMenuComponent implements OnInit, OnDestroy {
}

ngOnInit(): void {
if (!this.editor) {
throw new Error('NgxEditor: Required editor instance');
}

this.updateSubscription = this.editor.update
.subscribe((view) => {
this.update(view);
Expand Down

0 comments on commit bae942d

Please sign in to comment.