From 14cedc5ed1f82f0b4b21b93c5a6e354f7295b125 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sat, 1 Apr 2023 07:55:47 +0100 Subject: [PATCH] don't crash if `class` isn't a list --- src/components/rich_content/rich_content.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index c5fb1688..0da7f3de 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -188,7 +188,7 @@ export default { break } case 'span': - if (this.handleLinks && attrs['class'] && attrs['class'].includes('h-card')) { + if (this.handleLinks && attrs?.['class']?.includes?.('h-card')) { return ['', children.map(processItem), ''] } }