Skip to content

Commit

Permalink
Use built-in structuredClone to avoid deepClone dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Dec 16, 2023
1 parent 41baec0 commit 5a4bdd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions altair/jupyter/js/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import embed from "https://esm.sh/vega-embed@6?deps=vega@5&[email protected]";
import debounce from "https://esm.sh/[email protected]/debounce";
import cloneDeep from "https://esm.sh/[email protected]/cloneDeep";

export async function render({ model, el }) {
let finalize;
Expand All @@ -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) {
Expand Down

0 comments on commit 5a4bdd1

Please sign in to comment.