Unreachable code

This commit is contained in:
Jiiks 2018-03-17 13:21:08 -03:00
parent 549275e5dc
commit 0820735fa2
1 changed files with 3 additions and 6 deletions

View File

@ -90,11 +90,13 @@ class Reflection {
}
static getComponent(node, first = true) {
// IMPORTANT TODO Currently only checks the first found component. For example channel-member will not return the correct component
try {
return this.reactInternalInstance(node).return.type;
} catch (err) {
return null;
}
/*
if (!node) return null;
if (first) node = this.reactInternalInstance(node);
if (node.hasOwnProperty('return')) {
@ -103,12 +105,7 @@ class Reflection {
}
if (node.hasOwnProperty('type')) return node.type;
return null;
// IMPORTANT TODO Currently only checks the first found component. For example channel-member will not return the correct component
try {
return this.reactInternalInstance(node).return.type;
} catch (err) {
return null;
}
*/
}
}