Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit fdd141b

Browse files
fix: required scripts loading race condition
1 parent 1d89f5e commit fdd141b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

webcomponents/highlight-code/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
- support alias (such as `html` for `markup`)
1010
- load alias required scripts
11+
- required scripts loading race condition
1112

1213
# 2.2.1 (2020-11-19)
1314

webcomponents/highlight-code/src/components/highlight-code/deckdeckgo-highlight-code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export class DeckdeckgoHighlightCode {
227227

228228
document.head.appendChild(script);
229229

230-
resolve();
230+
script.addEventListener('load', () => resolve(), {once: true});
231231
});
232232
}
233233

0 commit comments

Comments
 (0)