Fix getReactProps for updated React

This commit is contained in:
chylex 2017-10-05 21:54:54 +02:00
parent bd76c3e985
commit f8b8b1915f
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ mentions
embeds
attachments
toDate
_currentElement
memoizedProps
props
children
channel

View File

@ -27,7 +27,7 @@ var DISCORD = (function(){
*/
getReactProps: function(ele){
var key = Object.keys(ele || {}).find(key => key.startsWith("__reactInternalInstance"));
return key ? ele[key]._currentElement.props : null;
return key ? ele[key].memoizedProps : null;
},
/*