[Vuejs]-Vuejs when reseting data TypeError: Cannot read property 'name' of undefined

0๐Ÿ‘

โœ…

if(response.data.status === true){
  resetFields();

that should probably be

 if(response.data.status === true){
  this.resetFields();

If you want to run the component method by that name.

Do you also have a function by that name defined outside of the component definition? or is this a typo in your example?

Leave a comment