Skip to content

Commit c2890d8

Browse files
CopilotTyriar
andcommitted
Add error handling for dynamic import in loadCustomGlyphDefinitions
Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
1 parent 7a7abdd commit c2890d8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

addons/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export function loadCustomGlyphDefinitions(): Promise<void> {
2828
if (!loadingPromise) {
2929
loadingPromise = import('./CustomGlyphDefinitions').then(module => {
3030
customGlyphDefinitions = module.customGlyphDefinitions;
31+
}).catch(err => {
32+
// Reset the loading promise on failure to allow retry
33+
loadingPromise = undefined;
34+
throw err;
3135
});
3236
}
3337
return loadingPromise;

0 commit comments

Comments
 (0)