From 086c84197c1c7124be9141297620b5176c811364 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Tue, 27 Sep 2016 14:50:53 -0700 Subject: [PATCH] fix(overlaid-comps): Check if supports preview only after we know exists --- src/components/overlaid-components/overlaid-components.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/overlaid-components/overlaid-components.jsx b/src/components/overlaid-components/overlaid-components.jsx index cfc9f1c24..38ab4e62f 100644 --- a/src/components/overlaid-components/overlaid-components.jsx +++ b/src/components/overlaid-components/overlaid-components.jsx @@ -190,7 +190,6 @@ export default class OverlaidComponents extends React.Component { const style = {left: data.left, top: data.top, position: 'absolute'} const component = CustomContenteditableComponents.get(data.componentKey); - const supportsPreviewWithinEditor = (component.supportsPreviewWithinEditor !== false); if (!component) { // It's possible that the plugin with that will register this @@ -199,6 +198,7 @@ export default class OverlaidComponents extends React.Component { continue } + const supportsPreviewWithinEditor = component.supportsPreviewWithinEditor !== false; const props = Object.assign({}, this.props.exposedProps, JSON.parse(data.componentProps),