Skip to content

Commit

Permalink
fix(module:input): fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
t1mer committed Sep 13, 2017
1 parent 46ae81a commit 92fe1c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/input/nz-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ export class NzInputComponent implements AfterContentInit, ControlValueAccessor,
}

set nzAutosize(value: string | boolean | AutoSizeType) {
if (value === '') {
if (typeof value === 'string') {
this._autosize = true;
} else {
this._autosize = value;
this._autosize = <boolean | AutoSizeType>value;
}
if (this._autosize) {
this.nzRows = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/components/input/nz-input.directive.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export class NzInputDirectiveComponent {
}

set nzAutosize(value: string | boolean | AutoSizeType) {
if (value === '') {
if (typeof value === 'string') {
this._autosize = true;
} else {
this._autosize = value;
this._autosize = <boolean | AutoSizeType>value;
}

if (this._autosize) {
Expand Down

0 comments on commit 92fe1c9

Please sign in to comment.