Skip to content

Commit c430896

Browse files
Cho, YongjoonDonaldcwl
authored andcommitted
Add null check to getNewCanvasAndCtx
Resolves #18
1 parent b542519 commit c430896

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export function getNewCanvasAndCtx (width, height) {
261261
canvas = new OffscreenCanvas(width, height)
262262
ctx = canvas.getContext('2d')
263263
if (ctx === null) {
264-
throw new Error('getContext of OffscreenCanvas returns null')
264+
throw new Error("getContext of OffscreenCanvas returns null")
265265
}
266266
} catch (e) {
267267
canvas = document.createElement('canvas')

0 commit comments

Comments
 (0)