Fix modals testing for props.noEsc (fixes #482)

th-downstream
Thibaut Girka 7 years ago
parent edc99abc02
commit f7b9911f71

@ -59,7 +59,7 @@ export default class ModalRoot extends React.PureComponent {
const visible = !!type;
return (
<Base onClose={onClose} noEsc={props.noEsc}>
<Base onClose={onClose} noEsc={props ? props.noEsc : false}>
{visible && (
<BundleContainer fetchComponent={MODAL_COMPONENTS[type]} loading={this.renderLoading(type)} error={this.renderError} renderDelay={200}>
{(SpecificComponent) => <SpecificComponent {...props} onClose={onClose} />}

Loading…
Cancel
Save