From 35687c3d04a0b94979223fb6b747e6184895a0bd Mon Sep 17 00:00:00 2001 From: Trotyl Yu Date: Mon, 11 Dec 2017 16:07:25 +0800 Subject: [PATCH] fix(module:rate): ensure value to be number (#728) --- src/components/rate/nz-rate.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/rate/nz-rate.component.ts b/src/components/rate/nz-rate.component.ts index de0dd78186..e897586b62 100644 --- a/src/components/rate/nz-rate.component.ts +++ b/src/components/rate/nz-rate.component.ts @@ -160,8 +160,8 @@ export class NzRateComponent implements OnInit, ControlValueAccessor { }; } - writeValue(value: number): void { - this.nzValue = value; + writeValue(value: number | null): void { + this.nzValue = value || 0; } registerOnChange(fn: (_: number) => void): void {