mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 03:29:46 +08:00
fix(overlaid-comps): Check if supports preview only after we know exists
This commit is contained in:
parent
38ba6ea015
commit
086c84197c
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue