From 9624426e7a5860aa54e2113abd001e5c33040bb0 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Mon, 15 Mar 2021 18:10:53 -0400 Subject: [PATCH] chore: small code refactor --- packages/vanilla-bundle/src/services/resizer.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vanilla-bundle/src/services/resizer.service.ts b/packages/vanilla-bundle/src/services/resizer.service.ts index 53440982b..20da8d13a 100644 --- a/packages/vanilla-bundle/src/services/resizer.service.ts +++ b/packages/vanilla-bundle/src/services/resizer.service.ts @@ -67,11 +67,11 @@ export class ResizerService { this._grid = grid; const fixedGridDimensions = (this.gridOptions?.gridHeight || this.gridOptions?.gridWidth) ? { height: this.gridOptions?.gridHeight, width: this.gridOptions?.gridWidth } : undefined; const autoResizeOptions = this.gridOptions?.autoResize ?? { bottomPadding: 0 }; - if (autoResizeOptions && autoResizeOptions.bottomPadding !== undefined && this.gridOptions.showCustomFooter) { + if (autoResizeOptions?.bottomPadding !== undefined && this.gridOptions.showCustomFooter) { const footerHeight: string | number = this.gridOptions?.customFooterOptions?.footerHeight ?? DATAGRID_FOOTER_HEIGHT; autoResizeOptions.bottomPadding += parseInt(`${footerHeight}`, 10); } - if (autoResizeOptions && autoResizeOptions.bottomPadding !== undefined && this.gridOptions.enablePagination) { + if (autoResizeOptions?.bottomPadding !== undefined && this.gridOptions.enablePagination) { autoResizeOptions.bottomPadding += DATAGRID_PAGINATION_HEIGHT; } if (fixedGridDimensions?.width && gridParentContainerElm?.style) {