mirror of
https://github.com/frappe/books.git
synced 2025-01-10 18:24:40 +00:00
[model] copy base object before extending
This commit is contained in:
parent
66c439d3d1
commit
084bd05fa9
@ -2,6 +2,7 @@ const deepmerge = require('deepmerge');
|
||||
|
||||
module.exports = {
|
||||
extend: (base, target, options = {}) => {
|
||||
base = deepmerge({}, base);
|
||||
const fieldsToMerge = (target.fields || []).map(df => df.fieldname);
|
||||
const fieldsToRemove = options.skipFields || [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user