Commit 056efa16 authored by traducer's avatar traducer Committed by Evan You

check if item exists before checking if children exist (#161)

parent 5ec72ddb
......@@ -39,7 +39,7 @@ function fetchItem (store) {
// recursively fetch all descendent comments
function fetchComments (store, item) {
if (item.kids) {
if (item && item.kids) {
return store.dispatch('FETCH_ITEMS', {
ids: item.kids
}).then(() => Promise.all(item.kids.map(id => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment