From d052ec8a4ad5ee73698d1319acc0f1cf21cc5b2e Mon Sep 17 00:00:00 2001 From: Hoang Vu Huy Date: Mon, 23 Dec 2024 16:49:36 +0700 Subject: [PATCH] Handle feedback --- .../product-detail-information-tab.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts b/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts index 6c7a8da6..4862f8b3 100644 --- a/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts +++ b/marketplace-ui/src/app/modules/product/product-detail/product-detail-information-tab/product-detail-information-tab.component.ts @@ -97,7 +97,7 @@ export class ProductDetailInformationTabComponent implements OnChanges { // To ensure the function always returns a boolean, you can explicitly coerce the result into a boolean using the !! operator or default it to false // Adding !! in case of changedProduct is undefined, it will return false instead of returning undefined isProductChanged(changedProduct: SimpleChange) { - return !!( changedProduct?.previousValue && + return !!(changedProduct?.previousValue && Object.keys(changedProduct.previousValue).length > 0 && changedProduct.currentValue !== changedProduct.previousValue );