fixes
This commit is contained in:
parent
9f49c6d846
commit
28d996de32
|
@ -129,7 +129,7 @@ class CharCounter {
|
|||
|
||||
processChannelTextAreaContainer (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name: "ChannelEditorContainer"});
|
||||
if (index > -1 && children[index].props.type && this.maxLenghts[children[index].props.type]) {
|
||||
if (index > -1 && children[index].props.type && this.maxLenghts[children[index].props.type] && !children[index].props.disabled) {
|
||||
if (!BDFDB.ArrayUtils.is(e.returnvalue.props.children)) e.returnvalue.props.children = [e.returnvalue.props.children];
|
||||
this.injectCounter(e.returnvalue, e.returnvalue.props.children, children[index].props.type, BDFDB.dotCN.textarea, true);
|
||||
}
|
||||
|
|
|
@ -253,7 +253,7 @@ class GoogleTranslateOption {
|
|||
|
||||
processChannelTextAreaContainer (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name: "ChannelEditorContainer"});
|
||||
if (index > -1 && children[index].props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL) {
|
||||
if (index > -1 && children[index].props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL && !children[index].props.disabled) {
|
||||
let [children2, index2] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["className", BDFDB.disCN.textareapickerbuttons]]});
|
||||
if (index2 > -1 && children2[index2].props && children2[index2].props.children) children2[index2].props.children.unshift(this.createTranslateButton());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue