From ed36dbfe511b91980608695033656bbabac609e8 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 7 Jan 2020 21:24:44 +0100 Subject: [PATCH] Update BDFDB.js --- Plugins/BDFDB.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/BDFDB.js b/Plugins/BDFDB.js index ccc8881a6b..5c8f105b54 100644 --- a/Plugins/BDFDB.js +++ b/Plugins/BDFDB.js @@ -3984,7 +3984,7 @@ BDFDB.StringUtils.getParsedLength = function (string, channelid = LibraryModules.LastChannelStore.getChannelId()) { if (typeof string != "string" || !string) return 0; var channel = LibraryModules.ChannelStore.getChannel(channelid); - var length = (!channel || string.indexOf("/") == 0 || string.indexOf("s/") == 0 || string.indexOf("+:") == 0) ? string.length : LibraryModules.MessageCreationUtils.parse(channel, string).content.length; + var length = !LibraryModules.MessageCreationUtils || (!channel || string.indexOf("/") == 0 || string.indexOf("s/") == 0 || string.indexOf("+:") == 0) ? string.length : LibraryModules.MessageCreationUtils.parse(channel, string).content.length; return length > string.length ? length : string.length; }; BDFDB.StringUtils.copyRichValue = function (string, richValue) { @@ -9896,4 +9896,4 @@ InternalBDFDB.reloadLib(); } }, 10000); -})(); \ No newline at end of file +})();