Expose Component to plugins (#778)

* Expose Component to plugins

* remove typo
This commit is contained in:
Tim Neutkens 2016-10-08 03:47:34 +02:00 committed by Guillermo Rauch
parent ad63cbbfdc
commit 3ff3350144

View file

@ -3,6 +3,7 @@ import {connect as reduxConnect} from 'react-redux';
// we expose these two deps to component decorators
import React from 'react';
import Component from '../component';
import Notification from '../components/notification';
import notify from './notify';
@ -451,7 +452,7 @@ function getDecorated(parent, name) {
let class__;
try {
class__ = fn(class_, {React, Notification, notify});
class__ = fn(class_, {React, Component, Notification, notify});
} catch (err) {
console.error(err.stack);
notify('Plugin error', `${fn._pluginName}: Error occurred in \`${method}\`. Check Developer Tools for details`);