Merge pull request #47531 from Abdeali099/modern-check-for-array

refactor: simplify `source_name` assignment in `map_current_doc`
This commit is contained in:
ruthra kumar
2025-05-27 11:17:18 +05:30
committed by GitHub

View File

@@ -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 ||