From e313656c55a66c76e2b081fb665f75f0c1bd40fb Mon Sep 17 00:00:00 2001 From: lsbbd <1206261187@qq.com> Date: Sun, 28 Mar 2021 00:30:35 +0800 Subject: [PATCH] fix(module:space): fix deprecated warning for nz-space-item (#6549) --- components/space/space.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/space/space.component.ts b/components/space/space.component.ts index 90a232c8918..b2d03166b45 100644 --- a/components/space/space.component.ts +++ b/components/space/space.component.ts @@ -98,7 +98,7 @@ export class NzSpaceComponent implements OnChanges, OnDestroy, AfterContentInit private updateSpaceItems(): void { const numberSize = typeof this.nzSize === 'string' ? SPACE_SIZE[this.nzSize] : this.nzSize; this.spaceSize = numberSize / (!!this.nzSplit ? 2 : 1); - if (this.nzSpaceItemComponents) { + if (this.nzSpaceItemComponents?.length) { warnDeprecation('`nz-space-item` in `nz-space` will be removed in 12.0.0, please use `*nzSpaceItem` instead.'); this.nzSpaceItemComponents.forEach(item => { item.setDirectionAndSize(this.nzDirection, this.spaceSize!);