Copy auth field objects when serializing values

This fixes a bug where the password field would be reset to an empty
value when serializing the mutation values. Making a copy of the auth
field values ensures that we are not inadvertently mutating the form
object.

Changelog: fixed
EE: true
parent 55e29602
......@@ -115,7 +115,7 @@ export default {
.map((url) => url.trim());
},
serializedAuthFields() {
const authFields = this.authSection.fields;
const authFields = { ...this.authSection.fields };
// not to send password value if unchanged
if (authFields.password === REDACTED_PASSWORD) {
delete authFields.password;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment