about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-05-15 10:52:07 +0200
committerGitHub <noreply@github.com>2018-05-15 10:52:07 +0200
commitf47f6c3345963e20be410a7fd10d6b676fce8afd (patch)
treef8c1a4ed3d81a3484a1030f4d023148c175cd311
parent939ea456d28072592e44809636919fb03e967001 (diff)
parentdfa60cb0a865a6477c92ea8dd3ee0c3aa033a56a (diff)
Merge pull request #483 from ThibG/glitch-soc/fixes/modal
Fix modals testing for props.noEsc (fixes #482)
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/modal_root.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.js b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
index cdb6dc9d0..7e9980ef7 100644
--- a/app/javascript/flavours/glitch/features/ui/components/modal_root.js
+++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
@@ -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} />}