Update BDFDB.js

This commit is contained in:
Mirco Wittrien 2020-01-07 21:24:44 +01:00 committed by GitHub
parent 9d2c96e180
commit ed36dbfe51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
})();
})();