Skip to content

Commit

Permalink
🔨 stop exposing grapher for charts embedded on a data page (#4216)
Browse files Browse the repository at this point in the history
sophiamersmann authored Nov 26, 2024
1 parent c77e1cf commit 664378f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@ourworldindata/grapher/src/core/Grapher.tsx
Original file line number Diff line number Diff line change
@@ -3120,7 +3120,7 @@ export class Grapher
this.setBaseFontSize()
this.setUpIntersectionObserver()
this.setUpWindowResizeEventHandler()
exposeInstanceOnWindow(this, "grapher")
if (!this.isEmbeddedInADataPage) exposeInstanceOnWindow(this, "grapher")
// Emit a custom event when the grapher is ready
// We can use this in global scripts that depend on the grapher e.g. the site-screenshots tool
this.disposers.push(

0 comments on commit 664378f

Please sign in to comment.