I was getting the following error: TypeError=: src .toArrayLike is not a function when the issue with my code was just that the front end was passing through the parameters of the anchor instruction in the incorrect order.
The frontend was passing addEmployee(name, salary) while the anchor program was expecting addEmployee(salary, name).
I was getting the following error:
TypeError=: src .toArrayLike is not a function
when the issue with my code was just that the front end was passing through the parameters of the anchor instruction in the incorrect order.The frontend was passing addEmployee(name, salary) while the anchor program was expecting addEmployee(salary, name).
Is there a way to improve this error?