Avoid creating new function every iteration of array.map
This commit is contained in:
parent
afbec934f3
commit
b9ba76f639
|
@ -62,7 +62,8 @@
|
|||
export const getAdditionalDataContext = () => {
|
||||
const gridContext = grid?.getContext()
|
||||
const rows = get(gridContext?.rows) || []
|
||||
const cleaned = rows.map(gridContext?.rows.actions.cleanRow || (x => x))
|
||||
const clean = gridContext?.rows.actions.cleanRow || (x => x)
|
||||
const cleaned = rows.map(clean)
|
||||
const goldenRow = generateGoldenSample(cleaned)
|
||||
const id = get(component).id
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue