Skip to content

Commit

Permalink
fix(module: textarea-item): fix textarea value can't be 0 or '' (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuonuoge authored and fisherspy committed Dec 25, 2018
1 parent 3657ec9 commit 0759f65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/textarea-item/textarea-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,10 @@ export class TextareaItem implements OnInit, AfterContentChecked, ControlValueAc


writeValue(value: any): void {
if (value) {
this._value = value;
if (typeof value === undefined || value === null) {
this._value = '';
}
this._value = value;
}
registerOnChange(fn: (_: any) => void): void {
this._onChange = fn;
Expand Down

0 comments on commit 0759f65

Please sign in to comment.