mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Add displayName for each plugin HOC (#1735)
This commit is contained in:
parent
c63df8f149
commit
f3594b3b14
1 changed files with 2 additions and 0 deletions
|
|
@ -391,6 +391,7 @@ function exposeDecorated(Component) {
|
|||
function getDecorated(parent, name) {
|
||||
if (!decorated[name]) {
|
||||
let class_ = exposeDecorated(parent);
|
||||
class_.displayName = `_exposeDecorated(${name})`;
|
||||
|
||||
modules.forEach(mod => {
|
||||
const method = 'decorate' + name;
|
||||
|
|
@ -401,6 +402,7 @@ function getDecorated(parent, name) {
|
|||
|
||||
try {
|
||||
class__ = fn(class_, {React, Component, Notification, notify});
|
||||
class__.displayName = `${fn._pluginName}(${name})`;
|
||||
} 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