mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 12:38:39 -09:00
Fix component decoration in renderer (#2454)
* Fix decorateNotification * Fix typo * Fix plugin decoration in renderer
This commit is contained in:
parent
54cc70e656
commit
8ce71b9d88
2 changed files with 4 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import {decorate} from '../utils/plugins';
|
|||
|
||||
import Notification_ from './notification';
|
||||
|
||||
const Notification = decorate(Notification_);
|
||||
const Notification = decorate(Notification_, 'Notification');
|
||||
|
||||
export default class Notifications extends PureComponent {
|
||||
template(css) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import {remote} from 'electron';
|
||||
import {connect as reduxConnect} from 'react-redux';
|
||||
import {basename} from 'path';
|
||||
|
||||
// patching Module._load
|
||||
// so plugins can `require` them without needing their own version
|
||||
|
|
@ -126,7 +127,7 @@ const loadModules = () => {
|
|||
const loadedPlugins = plugins.getLoadedPluginVersions().map(plugin => plugin.name);
|
||||
modules = paths.plugins
|
||||
.concat(paths.localPlugins)
|
||||
.filter(plugin => loadedPlugins.indexOf(plugin) !== -1)
|
||||
.filter(plugin => loadedPlugins.indexOf(basename(plugin)) !== -1)
|
||||
.map(path => {
|
||||
let mod;
|
||||
const pluginName = getPluginName(path);
|
||||
|
|
@ -496,7 +497,7 @@ export function decorate(Component_, name) {
|
|||
return class DecoratedComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {has_error: false};
|
||||
this.state = {hasError: false};
|
||||
}
|
||||
componentDidCatch() {
|
||||
this.setState({hasError: true});
|
||||
|
|
|
|||
Loading…
Reference in a new issue