From 6d923c778782764a513d61f8288ed01dfc6535d4 Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Thu, 30 May 2024 12:45:51 -0700 Subject: [PATCH] Require _addLayer helper function to always return an object --- src/jcanvas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jcanvas.ts b/src/jcanvas.ts index a61773f..7db5754 100644 --- a/src/jcanvas.ts +++ b/src/jcanvas.ts @@ -1776,7 +1776,7 @@ function _addLayer( params: JCanvasObject, args?: Partial, method?: (args: JCanvasObject) => JQuery -): JCanvasObject | null { +): JCanvasObject { const layer: JCanvasObject = params._layer ? (args as JCanvasLayer) : params; // Store arguments object for later use