From c43089666aedd5bab697be220257c9793a8130bc Mon Sep 17 00:00:00 2001 From: "Cho, Yongjoon" Date: Fri, 5 Jul 2019 17:47:56 +0900 Subject: [PATCH] Add null check to getNewCanvasAndCtx Resolves #18 --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index eb422a0..327f899 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -261,7 +261,7 @@ export function getNewCanvasAndCtx (width, height) { canvas = new OffscreenCanvas(width, height) ctx = canvas.getContext('2d') if (ctx === null) { - throw new Error('getContext of OffscreenCanvas returns null') + throw new Error("getContext of OffscreenCanvas returns null") } } catch (e) { canvas = document.createElement('canvas')