Skip to content

Commit

Permalink
Fix: exception handling - _setCharCount #1286
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Mar 24, 2024
1 parent 7de0d66 commit 1dcefc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -5785,7 +5785,11 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
*/
_setCharCount: function () {
if (context.element.charCounter) {
_w.setTimeout(function () { context.element.charCounter.textContent = functions.getCharCount(options.charCounterType); });
_w.setTimeout(function (functions, options) {
if (this.textContent && functions) {
this.textContent = functions.getCharCount(options.charCounterType);
}
}.bind(context.element.charCounter, functions, options), 0);
}
},

Expand Down

0 comments on commit 1dcefc6

Please sign in to comment.