From 474847872c418a9335aef46c00bc1944f20e451d Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Wed, 22 Feb 2023 11:13:38 +1100 Subject: [PATCH] Use Array.from for older browser support --- source/node/MergeSplit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/node/MergeSplit.ts b/source/node/MergeSplit.ts index ffd0e95..17645ec 100644 --- a/source/node/MergeSplit.ts +++ b/source/node/MergeSplit.ts @@ -60,7 +60,7 @@ const fixContainer = ( root: Element | DocumentFragment, ): Node => { let wrapper: HTMLElement | null = null; - [...container.childNodes].forEach((child) => { + Array.from(container.childNodes).forEach((child) => { const isBR = child.nodeName === 'BR'; if (!isBR && isInline(child)) { if (!wrapper) {