Skip to content

Commit b679688

Browse files
author
DD Liu
committed
Fix firefox
1 parent e7f1dce commit b679688

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/containers/gui.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ class GUI extends React.Component {
4848
this.props.vm.attachAudioEngine(this.audioEngine);
4949
this.props.vm.initialized = true;
5050
const fontPromises = [];
51-
if (document.fonts && document.fonts.values() && document.fonts.values().next) {
51+
if (document.fonts &&
52+
typeof document.fonts.values === 'function' &&
53+
typeof document.fonts.values()[Symbol.iterator] === 'function') {
5254
for (const fontFace of document.fonts.values()) {
5355
fontPromises.push(fontFace.loaded);
5456
fontFace.load();

0 commit comments

Comments
 (0)