Browse Source

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

closed-social-glitch-2
Thibaut Girka 6 years ago
parent
commit
dfa60cb0a8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/features/ui/components/modal_root.js

+ 1
- 1
app/javascript/flavours/glitch/features/ui/components/modal_root.js 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} />}

Loading…
Cancel
Save