mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Don't overwrite object => work with copies
This commit is contained in:
@@ -311,10 +311,10 @@ export default {
|
||||
const result = _merge_error_config(config?.errorHandling);
|
||||
|
||||
if (!config?.form) {
|
||||
result.combine.form = [];
|
||||
result.combine = { ...result.combine, form: [] };
|
||||
} else {
|
||||
const formHandler = result.handler.form;
|
||||
result.handler.form = errors => formHandler(config.form, errors);
|
||||
result.handler = { ...result.handler, form: errors => formHandler(config.form, errors) };
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user