diff --git a/frontend/src/utils/conditionUtil.js b/frontend/src/utils/conditionUtil.js index 3b3e0f1240..f5d86e426e 100644 --- a/frontend/src/utils/conditionUtil.js +++ b/frontend/src/utils/conditionUtil.js @@ -16,8 +16,9 @@ export const isChange = (conditions1, conditions2) => { if (conditions1.length !== conditions2.length) return true let arr1 = JSON.parse(JSON.stringify(conditions1)) let arr2 = JSON.parse(JSON.stringify(conditions2)) - arr1 = arr1.sort((s1, s2) => s1.componentId > s2.componentId) - arr2 = arr2.sort((s1, s2) => s1.componentId > s2.componentId) + const strCodeAt = (str) => str[0].charCodeAt() + arr1 = arr1.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId)) + arr2 = arr2.sort((s1, s2) => strCodeAt(s1.componentId) - strCodeAt(s2.componentId)) return JSON.stringify(arr1) !== JSON.stringify(arr2) }