Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
fix .split() of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed May 27, 2020
1 parent bad08f1 commit 575f4d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@
},
"win": {}
}
}
}
6 changes: 4 additions & 2 deletions src/routes/Overview/Project.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
sceneCount++;
if (scene.content) {
scene.content.blocks.forEach(block => {
wordCount += block.data.text.split(" ").length;
charCount += block.data.text.length;
if(block.data.text) {
wordCount += block.data.text.split(" ").length;
charCount += block.data.text.length;
}
});
}
});
Expand Down

1 comment on commit 575f4d5

@vercel
Copy link

@vercel vercel bot commented on 575f4d5 May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.