Skip to content

Commit

Permalink
Fixed empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwf committed Jan 13, 2025
1 parent 919f38c commit 4a08663
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/features/rendering-strategy/video-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ export function getVideoStrategy(
}

let captions: MediaStrategy['captions'] = [];
const annotationLists = vault.get(canvas.annotations);
const annotationLists = vault.get(canvas.annotations || []);
top: for (const annotationList of annotationLists) {
const annotations = vault.get(annotationList.items);
const annotations = vault.get(annotationList.items || []);
for (const annotation of annotations) {
const motivations: any[] = annotation.motivation
? Array.isArray(annotation.motivation || '')
? annotation.motivation
: [annotation.motivation]
: [];
if (motivations.includes('supplementing')) {
const bodies = vault.get(annotation.body);
const bodies = vault.get(annotation.body || []);
for (const _body of bodies) {
const body = _body as any;
if (body.type === 'Choice') {
Expand Down

0 comments on commit 4a08663

Please sign in to comment.