Update BDFDB.js

This commit is contained in:
Mirco Wittrien 2020-02-03 14:38:24 +01:00
parent d710a04d88
commit 708f7fdc53
1 changed files with 3 additions and 2 deletions

View File

@ -9747,14 +9747,15 @@
};
InternalBDFDB.processMessageHeader = function (e) {
if (e.instance.props.message && e.instance.props.message.author) {
let avatarWrapper = BDFDB.ReactUtils.getValue(e, "returnvalue.props.children.0.props.children");
let avatarWrapper = BDFDB.ReactUtils.getValue(e, "returnvalue.props.children.0");
if (avatarWrapper && avatarWrapper.props && typeof avatarWrapper.props.children == "function") {
let renderChildren = avatarWrapper.props.children;
avatarWrapper.props.children = (...args) => {
let renderedChildren = renderChildren(...args);
InternalBDFDB._processAvatarRender(e.instance.props.message.author, renderedChildren);
return renderChildren;
return renderedChildren;
};
console.log(avatarWrapper);
}
}
};