vue-mc icon indicating copy to clipboard operation
vue-mc copied to clipboard

routes is not a function if model has "routes" attribute

Open throrin19 opened this issue 5 years ago • 0 comments

I think the library has a problem, depends on the model attributes we have. For example, I Have this model :

{
  id : 1,
  name : 'test',
  routes : []
}

With this attribute routes, I have the specific error if I try to launch a fetch, save or delete :

TypeError: this.routes is not a function
    at DatabaseMachineModel.getRoute (vue-mc.es.js:731)
    at DatabaseMachineModel.getDeleteRoute (vue-mc.es.js:591)
    at DatabaseMachineModel.getDeleteURL (vue-mc.es.js:764)

I think, the problem is with all specifics fields with model functions names. Try with, for example, a model with the attribute request and you crash all the model.

throrin19 avatar Jun 03 '19 14:06 throrin19