diff --git a/.changeset/smart-books-scream.md b/.changeset/smart-books-scream.md new file mode 100644 index 0000000..507435b --- /dev/null +++ b/.changeset/smart-books-scream.md @@ -0,0 +1,6 @@ +--- +"@lookit/record": patch +--- + +Add missing default value for video consent "additional_segments" parameter, +which was causing an error when this optional parameter was omitted (#84). diff --git a/packages/record/src/consentVideo.ts b/packages/record/src/consentVideo.ts index 4c5e52d..97a4046 100644 --- a/packages/record/src/consentVideo.ts +++ b/packages/record/src/consentVideo.ts @@ -46,15 +46,16 @@ const info = { additional_segments: { type: ParameterType.COMPLEX, array: true, + default: [], nested: { title: { type: ParameterType.STRING, default: "", }, - }, - text: { - type: ParameterType.STRING, - default: "", + text: { + type: ParameterType.STRING, + default: "", + }, }, }, prompt_all_adults: { type: ParameterType.BOOL, default: false },