From a58907c71b6aac19af33306c27d3feea4cdad1d8 Mon Sep 17 00:00:00 2001
From: Armando Liccardo
Date: Thu, 14 Nov 2024 12:46:58 +0000
Subject: [PATCH] minor js fix
---
components/cacheExclusion/index.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/components/cacheExclusion/index.js b/components/cacheExclusion/index.js
index 8526d6b..43868a3 100644
--- a/components/cacheExclusion/index.js
+++ b/components/cacheExclusion/index.js
@@ -9,7 +9,7 @@ const CacheExclusion = ({ methods, constants }) => {
const apiUrl = methods.NewfoldRuntime.createApiUrl("/newfold-ecommerce/v1/cacheexclusion/update");
const handleCacheExclusionChange = (e) => {
- if( e.target.value !== cacheExclusion ) {
+ if( e.target.value !== currentValue ) {
setIsEdited(true);
}else{
setIsEdited(false);
@@ -25,6 +25,7 @@ const CacheExclusion = ({ methods, constants }) => {
}).then((result)=>{
setIsSaved(true);
setCacheExclusion(currentValue);
+ setIsEdited(false)
}).catch((error) => {
setIsError(error.message);
});