mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
refactor: simplify source_name assignment in map_current_doc function
This commit is contained in:
@@ -1027,11 +1027,7 @@ erpnext.utils.map_current_doc = function (opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (values.constructor === Array) {
|
opts.source_name = Array.isArray(values) ? [...new Set(values)] : values;
|
||||||
opts.source_name = [...new Set(values)];
|
|
||||||
} else {
|
|
||||||
opts.source_name = values;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
opts.allow_child_item_selection ||
|
opts.allow_child_item_selection ||
|
||||||
|
|||||||
Reference in New Issue
Block a user