From f3594b3b14c69aedf763b5043248d20f268200ba Mon Sep 17 00:00:00 2001 From: CHaBou Date: Wed, 12 Apr 2017 20:22:51 +0200 Subject: [PATCH] Add displayName for each plugin HOC (#1735) --- lib/utils/plugins.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils/plugins.js b/lib/utils/plugins.js index 31d563db..14c82b33 100644 --- a/lib/utils/plugins.js +++ b/lib/utils/plugins.js @@ -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`);