From c2890d8a4da4b5ce1cc30133f4501ecd4f100262 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 01:14:01 +0000 Subject: [PATCH] Add error handling for dynamic import in loadCustomGlyphDefinitions Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com> --- addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts b/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts index 9d32ac3e6..eb73117e5 100644 --- a/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts +++ b/addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts @@ -28,6 +28,10 @@ export function loadCustomGlyphDefinitions(): Promise { if (!loadingPromise) { loadingPromise = import('./CustomGlyphDefinitions').then(module => { customGlyphDefinitions = module.customGlyphDefinitions; + }).catch(err => { + // Reset the loading promise on failure to allow retry + loadingPromise = undefined; + throw err; }); } return loadingPromise;