From 179b4f87fa720db6506ba0679c8fb062e131a9a8 Mon Sep 17 00:00:00 2001 From: Nicolas Frizzarin Date: Wed, 20 Mar 2024 09:14:22 +0100 Subject: [PATCH] refactor(module:rate): remove deprecated observers --- components/rate/rate.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/rate/rate.component.ts b/components/rate/rate.component.ts index 06f6cfbfff2..7afcaa77d37 100644 --- a/components/rate/rate.component.ts +++ b/components/rate/rate.component.ts @@ -181,7 +181,7 @@ export class NzRateComponent implements OnInit, ControlValueAccessor, OnChanges .pipe(takeUntil(this.destroy$)) .subscribe(event => { this.isFocused = true; - if (this.nzOnFocus.observers.length) { + if (this.nzOnFocus.observed) { this.ngZone.run(() => this.nzOnFocus.emit(event)); } }); @@ -190,7 +190,7 @@ export class NzRateComponent implements OnInit, ControlValueAccessor, OnChanges .pipe(takeUntil(this.destroy$)) .subscribe(event => { this.isFocused = false; - if (this.nzOnBlur.observers.length) { + if (this.nzOnBlur.observed) { this.ngZone.run(() => this.nzOnBlur.emit(event)); } });