From df28e18c8b708d0e99ef2828b9642681a0696d81 Mon Sep 17 00:00:00 2001 From: velomovies <22169955+velomovies@users.noreply.github.com> Date: Mon, 1 Sep 2025 14:18:07 +0200 Subject: [PATCH] fix(datocms-helpers): add check for structured text data --- src/lib/datocms-helpers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/datocms-helpers.ts b/src/lib/datocms-helpers.ts index 7f45560..813d6e1 100644 --- a/src/lib/datocms-helpers.ts +++ b/src/lib/datocms-helpers.ts @@ -27,7 +27,12 @@ export function isStructuredTextText(value: any): boolean { (Object.keys(value).length === 3 && 'children' in value && 'type' in value && - 'style' in value)) + 'style' in value) || + (Object.keys(value).length === 4 && + 'children' in value && + 'type' in value && + 'style' in value && + 'level' in value)) ) }