1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-02 08:48:39 +09:00

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

Fix modals testing for props.noEsc (fixes #482)
This commit is contained in:
ThibG 2018-05-15 10:52:07 +02:00 committed by GitHub
commit f47f6c3345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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} />}