Skip to content

Commit 33ba160

Browse files
committed
fix(core): check setClearAlpha before calling
1 parent 9cda37b commit 33ba160

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/core/src/lib/roots.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ export function injectCanvasRootInitializer(injector?: Injector) {
257257
if (state.flat !== flat) stateToUpdate.flat = flat;
258258

259259
// Set gl props
260-
gl.setClearAlpha(0);
260+
if (gl.setClearAlpha) {
261+
gl.setClearAlpha(0);
262+
}
261263
gl.setPixelRatio(makeDpr(state.viewport.dpr));
262264
gl.setSize(state.size.width, state.size.height);
263265

0 commit comments

Comments
 (0)