diff --git a/site/multiembedder/MultiEmbedder.tsx b/site/multiembedder/MultiEmbedder.tsx index a54d47d2b23..3abc824771e 100644 --- a/site/multiembedder/MultiEmbedder.tsx +++ b/site/multiembedder/MultiEmbedder.tsx @@ -9,6 +9,7 @@ import { hydrateGlobalEntitySelectorIfAny, migrateSelectedEntityNamesParam, SelectionArray, + migrateGrapherConfigToLatestVersion, } from "@ourworldindata/grapher" import { fetchText, @@ -200,8 +201,11 @@ class MultiEmbedder { } else { configUrl = `${GRAPHER_DYNAMIC_CONFIG_URL}/${slug}.config.json` } - const grapherPageConfig = await fetchWithRetry(configUrl).then( - (res) => res.json() + const fetchedGrapherPageConfig = await fetchWithRetry( + configUrl + ).then((res) => res.json()) + const grapherPageConfig = migrateGrapherConfigToLatestVersion( + fetchedGrapherPageConfig ) const figureConfigAttr = figure.getAttribute(