Code-Pop / watch-us-build-trello

271 stars 180 forks source link

updateTask() is not working, also navigating to a task in the address bar is not working #5

Closed eqaderi closed 4 years ago

eqaderi commented 4 years ago

In 3rd lesson: navigating to a task directly from address bar raises error, the error in the console is:

[Vue warn]: Error in render: "TypeError: _vm.task is undefined"

found in

---> <Task> at src/views/Task.vue
       <Board> at src/views/Board.vue
         <App> at src/App.vue
           <Root>

Also in 4th lesson: updateTaskProperty is not working too... the error in the console for this one is:

[Vue warn]: Error in v-on handler: "ReferenceError: task is not defined"

found in

---> <Task> at src/views/Task.vue
       <Board> at src/views/Board.vue
         <App> at src/App.vue
           <Root>
shentao commented 4 years ago

Take a look at how Task.vue should look like: https://github.com/Code-Pop/watch-us-build-trello/blob/master/src/views/Task.vue

And then the Vuex store: https://github.com/Code-Pop/watch-us-build-trello/blob/master/src/store.js

If one of those elements (getTask) is missing OR the route param https://github.com/Code-Pop/watch-us-build-trello/blob/master/src/router.js#L18 couldn’t be found, this could throw an error that you mentioned.

eqaderi commented 4 years ago

Thank you so much for answering, it's really embarrassing but turned out it was a small typo that caused it.

shentao commented 4 years ago

Happens to everyone, believe me! 😅