Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return element;
} else if (
// When called by a provider `getRootProps` can't actually be called until
// the jsx is generated. Check if this is being rendered via any remirror
// context provider. In this case `getRootProps` **must** be called by the
// consumer.
isRemirrorContextProvider(element) ||
isRemirrorProvider(element) ||
isManagedRemirrorProvider(element)
) {
const { childAsRoot } = element.props;
return childAsRoot
? cloneElement(element, props, this.renderClonedElement(children, childAsRoot))
: element;
} else {
return isReactDOMElement(element) ? (
this.renderClonedElement(element)
) : (
<div>
);
}
}
</div>
return Children.map(children, child => {
if (!(isReactDOMElement(child) && elementIsEmpty(child) && elementIsOfType(child, 'p'))) {
return child;
}
const props = getElementProps(child);
return cloneElement(child, props, jsx('br'));
});
});
return Children.map(children, child => {
if (!(isReactDOMElement(child) && elementIsEmpty(child) && elementIsOfType(child, 'p'))) {
return child;
}
const props = getElementProps(child);
return cloneElement(child, props, jsx('br'));
});
});