Skip to content

Commit

Permalink
Improved: validation in setting value enum (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed May 31, 2024
1 parent 3ca2f2f commit 4fee308
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/views/ProductStoreDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,7 @@ async function updateProductStoreSettings(event: any, enumId: string, isToggle:
}
}
} else {
if(!settingEnums[enumId]?.settingValue && !event.target.value.trim()) return;
if(settingEnums[enumId]?.settingValue && settingEnums[enumId].settingValue === event.target.value.trim()) return;
if((!settingEnums[enumId]?.settingValue && !event.target.value.trim()) || (settingEnums[enumId]?.settingValue && settingEnums[enumId].settingValue === event.target.value.trim())) return;
if(settingEnums[enumId]) {
payload = {
Expand Down

0 comments on commit 4fee308

Please sign in to comment.