I am working within a Wordpress Gutenberg environment and have not been able to use arrow functions because they are assigning the function text to the const. See the following example:
const table = (table_id, tableStatus, block_table_ref) => {
let selectedTable = getTable(table_id, tableStatus);
if (selectedTable === undefined) {
const newTableId = getNewTableIdByBlock(block_table_ref);
selectedTable = getTable(newTableId, tableStatus);
}
return selectedTable;
};
console.log(table);
This is what gets returned to the console
(table_id, tableStatus, block_table_ref) => {
let selectedTable = getTable(table_id, tableStatus);
if (selectedTable === undefined) {
const newTableId = getNewTableIdByBlock(block…
I hope someone has experience this previously and can help me identify and fix the root cause.