From 9881e5b42fe28c24432a9b7e9f5dc7686c6c616b Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 10 Dec 2021 01:02:02 +0100 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index b4871f6709..3b7164a69d 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.0.1 + * @version 2.0. * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -19,7 +19,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "2.0.1", + "version": "2.0.2", "description": "Required Library for DevilBro's Plugins" }, "rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js` @@ -4997,7 +4997,7 @@ module.exports = (_ => { else string = input.value || input.textContent || ""; } else string = input.value || input.textContent || ""; - if (this.props.max && this.props.showPercentage && (string.length/this.props.max) * 100 < this.props.showPercentage) return null; + if (this.props.max && this.props.showPercentage && (string.length/this.props.max) * 100 < this.props.showPercentage) return ""; let start = input.selectionStart || 0, end = input.selectionEnd || 0, selectlength = end - start, selection = BDFDB.DOMUtils.getSelection(); let select = !selectlength && !selection ? 0 : (selectlength || selection.length); select = !select ? 0 : (select > string.length ? (end || start ? string.length - (string.length - end - start) : string.length) : select); @@ -5080,7 +5080,6 @@ module.exports = (_ => { } render() { let string = this.getCounterString(); - if (!string) return null; BDFDB.TimeUtils.timeout(_ => string != this.getCounterString() && BDFDB.ReactUtils.forceUpdate(this)); return BDFDB.ReactUtils.createElement("div", BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, { className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.charcounter, this.props.className),