mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-29 03:28:32 +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;
|
||||
}
|
||||
|
||||
if (values.constructor === Array) {
|
||||
opts.source_name = [...new Set(values)];
|
||||
} else {
|
||||
opts.source_name = values;
|
||||
}
|
||||
opts.source_name = Array.isArray(values) ? [...new Set(values)] : values;
|
||||
|
||||
if (
|
||||
opts.allow_child_item_selection ||
|
||||
|
||||
Reference in New Issue
Block a user