From 5e5aa99c77fc434667135731885fd959bf859543 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 7 Sep 2020 16:32:32 +0800 Subject: [PATCH] bugfix --- src/base/single/text.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/single/text.js b/src/base/single/text.js index ace85aec91..823843bfcd 100644 --- a/src/base/single/text.js +++ b/src/base/single/text.js @@ -162,8 +162,10 @@ formatters.push(formatter); }; BI.Text.formatText = function (text) { - for (var i = 0, len = formatters.length; i < len; i++) { - text = formatters[i](text); + if (formatters.length > 0) { + for (var i = 0, len = formatters.length; i < len; i++) { + text = formatters[i](text); + } } return text; };