diff --git a/src/core/platform/web/jquery/fn.js b/src/core/platform/web/jquery/fn.js index 4798e90af..341719b54 100644 --- a/src/core/platform/web/jquery/fn.js +++ b/src/core/platform/web/jquery/fn.js @@ -99,7 +99,7 @@ if (BI.jQuery) { } // BI-56945 场景: 对'啊a'标红, a为keyword, 此时tidx为1, pidx为0, 此时使用tidx显然'啊'就无法标红了 - if (tidx >= 0 && pidx > tidx) { + if (tidx >= 0 && BI.isNotNull(pidx) && pidx > tidx) { // 标红的text未encode this.append(BI.htmlEncode(textLeft.substr(0, tidx))); this.append(BI.$("").addClass("bi-keyword-red-mark")