Skip to content

Commit 7843f98

Browse files
committed
Fix build web
1 parent 69d8938 commit 7843f98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package/src/renderer/Canvas.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { SkiaDomView } from "../views";
1818
import { Skia } from "../skia/Skia";
1919
import type { TouchHandler, SkiaBaseViewProps } from "../views";
2020
import { SkiaDomView2 } from "../views/SkiaDomView2";
21+
import { Platform } from "../Platform";
2122

2223
import { SkiaRoot } from "./Reconciler";
2324
import { NATIVE_DOM } from "./HostComponents";
@@ -90,7 +91,7 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
9091
};
9192
}, [root]);
9293

93-
if (NATIVE_DOM) {
94+
if (NATIVE_DOM || Platform.OS === "web") {
9495
return (
9596
<SkiaDomView
9697
ref={ref}

0 commit comments

Comments
 (0)