mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Merge pull request #47531 from Abdeali099/modern-check-for-array
refactor: simplify `source_name` assignment in `map_current_doc`
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