refactor: simplify source_name assignment in map_current_doc function

This commit is contained in:
Abdeali Chharchhoda
2025-05-13 16:43:13 +05:30
parent f67559bb1e
commit 80320ffa25

View File

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