Add error handling for dynamic import in loadCustomGlyphDefinitions

Co-authored-by: Tyriar <2193314+Tyriar@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-16 01:14:01 +00:00
co-authored by Tyriar
parent 7a7abddc45
commit c2890d8a4d
@@ -28,6 +28,10 @@ export function loadCustomGlyphDefinitions(): Promise<void> {
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;