0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Use Array.from for older browser support

This commit is contained in:
Neil Jenkins 2023-02-22 11:13:38 +11:00
parent 4306cecb6e
commit 474847872c

View file

@ -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) {