feat: Allow to skip submitting empty values in form data (#5830)

This commit is contained in:
abcang
2020-05-30 07:46:08 +09:00
committed by GitHub
parent eaca2f6fd8
commit b9b32c9c93
10 changed files with 75 additions and 27 deletions

View File

@@ -947,3 +947,15 @@ function b64toB64UrlEncoded(str) {
.replace(/\//g, "_")
.replace(/=/g, "")
}
export const isEmptyValue = (value) => {
if (!value) {
return true
}
if (isImmutable(value) && value.isEmpty()) {
return true
}
return false
}