Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return columns.map((column: EntityTableColumn) => {
let valueAccessor;
if (column.renderer === undefined || column.renderer === EntityTableColumnRenderer.Default) {
valueAccessor = column.valueAccessor;
}
valueAccessor = valueAccessor ? valueAccessor : getEntityProperty;
return valueAccessor(entity, column.name);
});
});