Этот коммит содержится в:
Christopher Speller
2017-09-06 20:43:18 -07:00
родитель fd86a2490e e589accdaf
Коммит 77709ccdda
10 изменённых файлов: 114 добавлений и 13 удалений

Просмотреть файл

@@ -19,6 +19,10 @@ import PropTypes from 'prop-types';
import React from 'react';
export default class ProfilePopover extends React.Component {
static getComponentName() {
return 'ProfilePopover';
}
constructor(props) {
super(props);

Просмотреть файл

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