Skip to content

Commit bff06ce

Browse files
committed
Synced reloadFontSymbol function
Signed-off-by: Ko Nagase <[email protected]>
1 parent 4aab259 commit bff06ce

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/components/gtt-client.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,15 +1132,11 @@ export class GttClient {
11321132

11331133
reloadFontSymbol() {
11341134
if ('fonts' in document) {
1135-
(document as any).fonts.ready.then(() => {
1135+
(document as any).fonts.addEventListener('loadingdone', () => {
11361136
let loaded = false;
11371137
(document as any).fonts.forEach((f:any) => {
1138-
if (f.family === '"mcr-icons"' || f.family === '"fontmaki"') {
1139-
if (f.status === 'unloaded') {
1140-
f.load().then(() => console.log('loaded'))
1141-
} else {
1142-
loaded = true
1143-
}
1138+
if (f.family === 'fontmaki') {
1139+
loaded = true
11441140
}
11451141
})
11461142
if (loaded) {

0 commit comments

Comments
 (0)