diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 20:43:18 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 20:43:18 -0700 |
commit | 77709ccdda86408d5135b8bc71462e2111992358 (patch) | |
tree | 5efc1631eb6cb31f8768fafeb58612557d98cb59 /webapp/plugins/pluggable/pluggable.jsx | |
parent | fd86a2490ea81eba8e12dcce76455710f182f81c (diff) | |
parent | e589accdaf38bb82cb5d3b5dd84eadf9bfb58b5c (diff) | |
download | chat-77709ccdda86408d5135b8bc71462e2111992358.tar.gz chat-77709ccdda86408d5135b8bc71462e2111992358.tar.bz2 chat-77709ccdda86408d5135b8bc71462e2111992358.zip |
Merge release-4.2
Diffstat (limited to 'webapp/plugins/pluggable/pluggable.jsx')
-rw-r--r-- | webapp/plugins/pluggable/pluggable.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/plugins/pluggable/pluggable.jsx b/webapp/plugins/pluggable/pluggable.jsx index 566e024e5..c81d8df5e 100644 --- a/webapp/plugins/pluggable/pluggable.jsx +++ b/webapp/plugins/pluggable/pluggable.jsx @@ -33,6 +33,8 @@ export default class Pluggable extends React.PureComponent { return null; } + const childName = child.getComponentName(); + // Include any props passed to this component or to the child component let props = {...this.props}; Reflect.deleteProperty(props, 'children'); @@ -40,8 +42,8 @@ export default class Pluggable extends React.PureComponent { props = {...props, ...this.props.children.props}; // Override the default component with any registered plugin's component - if (components.hasOwnProperty(child.name)) { - const PluginComponent = components[child.name]; + if (components.hasOwnProperty(childName)) { + const PluginComponent = components[childName]; return ( <PluginComponent {...props} |