Merge pull request #483 from ThibG/glitch-soc/fixes/modal

Fix modals testing for props.noEsc (fixes #482)
th-downstream
ThibG 7 years ago committed by GitHub
commit eb6c1da920

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

Loading…
Cancel
Save