diff --git a/resources/vue/components/courseware/CoursewareTableOfContentsBlock.vue b/resources/vue/components/courseware/CoursewareTableOfContentsBlock.vue index e35e041962f2aa3aa51e62baf69f53d563a9291c..f033000b1f3c9d582e4f57f4b84033f5cfe9349d 100755 --- a/resources/vue/components/courseware/CoursewareTableOfContentsBlock.vue +++ b/resources/vue/components/courseware/CoursewareTableOfContentsBlock.vue @@ -45,9 +45,9 @@ <p>{{ child.attributes.payload.description }}</p> </div> <footer> - {{ countChildren }} + {{ countChildChildren(child)}} <translate - :translate-n="countChildren" + :translate-n="countChildChildren(child)" translate-plural="Seiten" > Seite @@ -171,6 +171,9 @@ export default { return {}; } }, + countChildChildren(child) { + return this.childrenById(child.id).length; + }, hasImage(child) { return child.relationships?.image?.data !== null; },