ditojs / dito

Dito.js is a declarative and modern web framework with a focus on API driven development, based on Objection.js, Koa.js and Vue.js – Developed at Lineto by Jürg Lehni and made available by Lineto in 2018 under the MIT license
https://lineto.com
MIT License
82 stars 8 forks source link

TypeError: Cannot read property 'messages' of null #42

Closed puckey closed 1 year ago

puckey commented 3 years ago

I was able to reproduce the issue I mentioned in https://github.com/ditojs/dito/commit/ab6e4e4b6f8678b752bbd29b25c6bd80ebf990b9 here: https://github.com/puckey/dito-example/tree/reproduce/tab-error

Go to /admin/dummies/1 and then click on the edit button of one of the messages.

it produces the following error:

vue.esm.js:628 [Vue warn]: Error in render: "TypeError: Cannot read property 'messages' of null"

found in

---> <DitoForm>... (1 recursive calls)
       <DitoView>
         <DitoRoot>
           <Root>
warn @ vue.esm.js:628

vue.esm.js:1897 TypeError: Cannot read property 'messages' of null
    at VueComponent.selectedTab (DitoSchema.vue:247)
    at Watcher.get (vue.esm.js:4488)
    at Watcher.evaluate (vue.esm.js:4593)
    at VueComponent.computedGetter [as selectedTab] (vue.esm.js:4845)
    at VueComponent.selectedTab (DitoForm.vue:129)
    at Watcher.get (vue.esm.js:4488)
    at Watcher.evaluate (vue.esm.js:4593)
    at Proxy.computedGetter (vue.esm.js:4845)
    at Proxy.pi (DitoForm.vue?3047:1)
    at VueComponent.Vue._render (vue.esm.js:3557)