Skip to content

Commit

Permalink
fix(module: textarea-item): fix textarea-item value protect (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuonuoge authored and fisherspy committed Mar 12, 2019
1 parent b69ee5a commit ffe4f8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/textarea-item/textarea-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class TextareaItem implements OnInit, AfterContentChecked, ControlValueAc
return this._value;
}
set value(v: string) {
if (typeof v === undefined || v === null) {
if (typeof v === 'undefined' || v === null) {
this._value = '';
} else {
this._value = v;
Expand Down Expand Up @@ -277,7 +277,7 @@ export class TextareaItem implements OnInit, AfterContentChecked, ControlValueAc


writeValue(value: any): void {
if (typeof value === undefined || value === null) {
if (typeof value === 'undefined' || value === null) {
this._value = '';
} else {
this._value = value;
Expand Down

0 comments on commit ffe4f8d

Please sign in to comment.