diff --git a/catalog/stories/theme-loader.ts b/catalog/stories/theme-loader.ts index eda95aa615..4f5ef80c33 100644 --- a/catalog/stories/theme-loader.ts +++ b/catalog/stories/theme-loader.ts @@ -32,6 +32,9 @@ function applyTheme(theme: string) { * Apply the theme every time a postdoc pessage is received. */ const onMessage = (e: MessageEvent) => { + if (e.origin !== window.location.origin) { + return; + } applyTheme(e.data); };