From 5a4bdd1bd5ab2ebd35907f89697da003e8121006 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Sat, 16 Dec 2023 13:49:53 -0500 Subject: [PATCH] Use built-in structuredClone to avoid deepClone dependency --- altair/jupyter/js/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/altair/jupyter/js/index.js b/altair/jupyter/js/index.js index 37b8b739c..d54f66266 100644 --- a/altair/jupyter/js/index.js +++ b/altair/jupyter/js/index.js @@ -1,6 +1,5 @@ import embed from "https://esm.sh/vega-embed@6?deps=vega@5&deps=vega-lite@5.16.3"; import debounce from "https://esm.sh/lodash-es@4.17.21/debounce"; -import cloneDeep from "https://esm.sh/lodash-es@4.17.21/cloneDeep"; export async function render({ model, el }) { let finalize; @@ -22,7 +21,7 @@ export async function render({ model, el }) { model.set("local_tz", Intl.DateTimeFormat().resolvedOptions().timeZone); - let spec = cloneDeep(model.get("spec")); + let spec = structuredClone(model.get("spec")); if (spec == null) { // Remove any existing chart and return while (el.firstChild) {