From 2a71c436b6a6ebaa6d4b3d6d77409dff6870937b Mon Sep 17 00:00:00 2001 From: Wendell Date: Fri, 8 Nov 2019 16:21:27 +0800 Subject: [PATCH] fix(module:tooltip): fix not undefined value not updated (#4392) * fix(module:tooltip): fix not undefined value not updated * fix: typo * fix: remove unused var --- components/tooltip/base/nz-tooltip-base.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tooltip/base/nz-tooltip-base.directive.ts b/components/tooltip/base/nz-tooltip-base.directive.ts index 60bf759dbe4..333d71e725e 100644 --- a/components/tooltip/base/nz-tooltip-base.directive.ts +++ b/components/tooltip/base/nz-tooltip-base.directive.ts @@ -23,7 +23,7 @@ import { SimpleChanges, ViewContainerRef } from '@angular/core'; -import { isNotNil, warnDeprecation, NgStyleInterface, NzNoAnimationDirective, NzTSType } from 'ng-zorro-antd/core'; +import { warnDeprecation, NgStyleInterface, NzNoAnimationDirective, NzTSType } from 'ng-zorro-antd/core'; import { Subject } from 'rxjs'; import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; @@ -331,7 +331,7 @@ export abstract class NzTooltipBaseDirective implements OnChanges, OnInit, OnDes // tslint:disable-next-line no-any private updateComponentValue(key: string, value: any): void { - if (isNotNil(value)) { + if (typeof value !== 'undefined') { // @ts-ignore this.tooltip[key] = value; }