Skip to content

Commit

Permalink
Merge pull request #5354 from voxel51/fix/canvas-init-bug
Browse files Browse the repository at this point in the history
check typeof offscreen canvas in IIFE
  • Loading branch information
sashankaryal authored Jan 7, 2025
2 parents 6fbed2c + ca5861d commit 55709fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/packages/looker/src/worker/canvas-decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HEATMAP } from "@fiftyone/utilities";
import { OverlayMask } from "../numpy";

const canvasAndCtx = (() => {
if ("OffscreenCanvas" in self) {
if (typeof OffscreenCanvas !== "undefined") {
const offScreenCanvas = new OffscreenCanvas(1, 1);
const offScreenCanvasCtx = offScreenCanvas.getContext("2d", {
willReadFrequently: true,
Expand Down

0 comments on commit 55709fb

Please sign in to comment.