From 33c26e1921ffbf63beb60f4008f39bd908610efd Mon Sep 17 00:00:00 2001 From: Pierniki Date: Tue, 5 Sep 2023 12:34:39 +0200 Subject: [PATCH] fix: remove handling fields other than text in slateToText --- utils/slateToText.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/slateToText.ts b/utils/slateToText.ts index 6179b7d9..3d87999f 100644 --- a/utils/slateToText.ts +++ b/utils/slateToText.ts @@ -1,4 +1,4 @@ -import { isArray, isObject, isString, values } from "lodash" +import { isArray, isObject, values } from "lodash" export function slateToText(obj: unknown): string { if (isObject(obj)) { @@ -10,6 +10,5 @@ export function slateToText(obj: unknown): string { .reduce((acc, val) => acc + val, "") } if (isArray(obj)) return obj.map(slateToText).reduce((acc, val) => acc + val, "") - if (isString(obj)) return obj return "" }