From 15f5282d8c403d26c4fa642f673963545f85e8ff Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Tue, 25 Nov 2025 23:56:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E4=B8=AA=20id=20=E5=85=B1?= =?UTF-8?q?=E7=94=A8=E4=B8=80=E4=B8=AA=E5=81=8F=E7=A7=BB=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=94=BB=E4=B8=8D=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages-user/client-base/src/material/fallback.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages-user/client-base/src/material/fallback.ts b/packages-user/client-base/src/material/fallback.ts index 6b3444a..e6ceac6 100644 --- a/packages-user/client-base/src/material/fallback.ts +++ b/packages-user/client-base/src/material/fallback.ts @@ -9,9 +9,10 @@ function extractClsBlocks>( icons: Record ): IBlockIdentifier[] { const max = Math.max(...Object.values(icons)); - const arr = Array(max).fill(0); + const arr = Array(max).fill(void 0); for (const [key, value] of Object.entries(icons)) { - if (!(key in map)) continue; + // 样板编辑器 bug 可能会导致多个 id 使用一个偏移,因此要判断下 + if (!(key in map) || !isNil(arr[value])) continue; const id = key as AllIdsOf; const num = map[id] as keyof NumberToId; const identifier: IBlockIdentifier = {