Skip to content

Commit 6163bcc

Browse files
committed
iterate fonts directly not .values()
1 parent ee68ab5 commit 6163bcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/sandcastle/src/SandcastleEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function SandcastleEditor({
8686
const documentRef = useRef(document);
8787
useEffect(() => {
8888
const cssName = availableFonts[fontFamily]?.cssValue ?? "Droid Sans Mono";
89-
const fontFace = [...documentRef.current.fonts.values()].find(
89+
const fontFace = [...documentRef.current.fonts].find(
9090
(font) => font.family === cssName && font.weight === "400",
9191
);
9292
if (fontFace?.status !== "loaded") {

0 commit comments

Comments
 (0)