From 23975350624ba335a16a9bb04d6430aa8b12e990 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Wed, 3 Jul 2024 10:43:09 -0400 Subject: [PATCH] fix: apply patch before posting (#1337) this means we may change the mode from Vega-Lite to Vega if there is a patch --- src/embed.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/embed.ts b/src/embed.ts index 77ae6849..22345f27 100644 --- a/src/embed.ts +++ b/src/embed.ts @@ -522,9 +522,9 @@ async function _embed( editorLink.addEventListener('click', function (this, e) { post(window, editorUrl, { config: config as Config, - mode, + mode: patch ? 'vega' : mode, renderer, - spec: stringify(spec), + spec: stringify(patch ? vgSpec : spec), }); e.preventDefault(); });