Don't submit field that is empty when original value is null

This commit is contained in:
cgfhtw
2023-10-31 14:44:52 +01:00
parent be7321723a
commit 562b8b000f
@@ -76,7 +76,8 @@ export default {
if (new Date(this.original[k]).toString() != new Date(n[k]).toString())
res[k] = n[k];
} else {
if (this.original[k] !== n[k])
// TODO(chris): null && ""? should there be an exception for this?
if (this.original[k] !== n[k] && !(this.original[k] === null && n[k] === ""))
res[k] = n[k];
}
}