Update CustomQuoter.plugin.js

This commit is contained in:
Mirco Wittrien 2020-11-19 19:55:06 +01:00 committed by GitHub
parent 5abc73ca6d
commit b5f306b596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ module.exports = (_ => {
"info": {
"name": "CustomQuoter",
"author": "DevilBro",
"version": "1.1.8",
"version": "1.1.9",
"description": "Customize the output of the native quote feature of Discord"
},
"changeLog": {
@ -315,7 +315,7 @@ module.exports = (_ => {
onMessageOptionToolbar (e) {
if (e.instance.props.expanded && e.instance.props.message && e.instance.props.channel) {
let quoteButton = BDFDB.ReactUtils.findChild(e.returnvalue, {key: "quote"});
if (!!quoteButton) {
if (!quoteButton) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {key: "mark-unread"});
children.splice(index > -1 ? index : 0, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
key: "quote",
@ -414,4 +414,4 @@ module.exports = (_ => {
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();
})();