From 0a5a1e3452e7f895d1b2abf3f726e5e4735f79aa Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 12 Apr 2024 15:24:11 -0300 Subject: html: SO WE BACK IF && THE MINE --- src/util/html.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/util/html.js b/src/util/html.js index 7bce9ae8..d1d509e2 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -1838,15 +1838,19 @@ const isAttributesAdditionSingletHelper = looseArrayOf(value => isAttributesAdditionSinglet(value))); export const isAttributesAdditionSinglet = (value) => { - if (typeof value === 'object') { + if (typeof value === 'object' && value !== null) { if (Object.hasOwn(value, blessAttributes)) { return true; } - if (Array.isArray(value) && value.length === 1) { - if (Object.hasOwn(value[0], blessAttributes)) { - return true; - } + if ( + Array.isArray(value) && + value.length === 1 && + typeof value[0] === 'object' && + value[0] !== null && + Object.hasOwn(value[0], blessAttributes) + ) { + return true; } } -- cgit 1.3.0-6-gf8a5