mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Expose Component to plugins (#778)
* Expose Component to plugins * remove typo
This commit is contained in:
parent
ad63cbbfdc
commit
3ff3350144
1 changed files with 2 additions and 1 deletions
|
|
@ -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`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue