TiBianMod / vuex-orm-decorators

Decorator Syntax for Vuex ORM for better type safety.
MIT License
29 stars 11 forks source link

Fix "TypeError: this.types is not a function" #4

Closed armaaar closed 4 years ago

armaaar commented 4 years ago

Fixes #3 The issue isn't from Vuex-ORM itself. By looking at Single Table Inheritance at the Vuex-ORM we can obviously see that types is a function but we clearly initialize it as an object in model.ts.

Also the types parameter can be undefined but there was no check if it was undefined before using it causing trouble.

I've fixed both issues built. I've to point that from my tiny dive into this package that it isn't fully ready yet for table inheritance features built in Vuex-ORM but still is great for simple use cases.

JasonLandbridge commented 4 years ago

@Scotley, Could this please be merged? My project is waiting for this before using Vuex-orm as the errors are blocking.

Scotley commented 4 years ago

Apologies for the delay. I have actually reviewed this and will merge it now.

JasonLandbridge commented 4 years ago

Thank you!

breynolds commented 4 years ago

Thanks for this update. I was waiting for this too.