From 156e61c3ba1e2736c835e5a59fd6bbde0237e4aa Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Tue, 7 May 2019 14:22:50 -0700 Subject: [PATCH] fix embed URL button --- components/Carbon.js | 6 ++++-- components/ExportMenu.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/Carbon.js b/components/Carbon.js index fed2446..00d1d01 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -95,6 +95,8 @@ class Carbon extends React.PureComponent { const themeConfig = this.props.theme || THEMES_HASH[config.theme] + const light = themeConfig && themeConfig.light + const content = (
{config.windowControls ? ( @@ -102,7 +104,7 @@ class Carbon extends React.PureComponent { theme={config.windowTheme} code={this.props.children} copyable={this.props.copyable} - light={themeConfig.light} + light={light} /> ) : null} - {config.watermark && } + {config.watermark && }
diff --git a/components/ExportMenu.js b/components/ExportMenu.js index 99aaab1..a310a8d 100644 --- a/components/ExportMenu.js +++ b/components/ExportMenu.js @@ -15,7 +15,7 @@ const toIFrame = url => ` -const toURL = url => encodeURI(`${location.origin}/embed${url}`) +const toURL = url => encodeURI(`${location.origin}${url}`) const MAX_PAYLOAD_SIZE = 5e6 // bytes function verifyPayloadSize(str) {