Skip to content

Commit

Permalink
fix: ngModel data binding with editor`s textarea
Browse files Browse the repository at this point in the history
closes #45
  • Loading branch information
sibiraj-s committed Feb 5, 2018
1 parent cdfd4bc commit 4f4967a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/ngx-editor/ngx-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ export class NgxEditorComponent implements OnInit, ControlValueAccessor {
* @param value value to be executed when there is a change in contenteditable
*/
writeValue(value: any): void {
this.monitorEditor(value);

if (!!value) {
if (value === null || value === undefined || value === '') {
return;
}

this.refreshView(value);
this.monitorEditor(value);
}

/**
Expand Down

0 comments on commit 4f4967a

Please sign in to comment.