Skip to content

Commit

Permalink
fixing vue build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephiescastle committed Sep 5, 2024
1 parent 67609de commit f657195
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ interface EduLessonProcedureBlocks {
blocks: StreamfieldBlockData[]
}
export interface EduLessonProcedure {
procedure: EduLessonProcedureBlocks
sectionHeading?: string
steps?: EduLessonProcedureBlocks[]
stepsNumbering?: boolean
}
interface PageEduLessonObject extends PageEduResourcesObject {
Expand Down Expand Up @@ -192,8 +194,8 @@ const consolidatedBlocks = computed(() => {
} else if (section === 'procedures' && data.procedures?.length) {
// get blocks in nested procedures
data.procedures.forEach((item) => {
if (item.procedure?.blocks?.length) {
blocks.push(...item.procedure.blocks)
if (item.steps?.length) {
blocks.push(...item.steps)
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ const props = withDefaults(defineProps<PageEduLessonSectionProps>(), {
const { heading, blocks, image } = reactive(props)
const anchorId = computed(() => {
return 'lesson_' + camelCase(heading.heading)
return 'lesson_' + camelCase(heading?.heading)
})
</script>
<template>
<section
:id="anchorId"
class="PageEduLessonSection"
:aria-label="heading.heading"
:aria-label="heading?.heading"
>
<LayoutHelper
indent="col-3"
Expand Down

0 comments on commit f657195

Please sign in to comment.