From 22191caa82ad402388dfd11115e00f9793105c9a Mon Sep 17 00:00:00 2001 From: doodlewind <7312949+doodlewind@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:26:58 +0000 Subject: [PATCH] fix(editor): safari compat for lit host (#10514) Fixed this white screen crash on mobile safari: --- blocksuite/framework/block-std/src/view/element/lit-host.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocksuite/framework/block-std/src/view/element/lit-host.ts b/blocksuite/framework/block-std/src/view/element/lit-host.ts index d94fc575d8..0f0cf3e310 100644 --- a/blocksuite/framework/block-std/src/view/element/lit-host.ts +++ b/blocksuite/framework/block-std/src/view/element/lit-host.ts @@ -58,7 +58,7 @@ export class EditorHost extends SignalWatcher( } const widgetViews = this.std.provider.getAll(WidgetViewIdentifier); - const widgets = widgetViews.entries().reduce( + const widgets = Array.from(widgetViews.entries()).reduce( (mapping, [key, tag]) => { const [widgetFlavour, id] = key.split('|'); if (widgetFlavour === flavour) {