Commit 3cbb1ce9 authored by liujiangnan's avatar liujiangnan

fix: 健壮性处理

parent 5a4f4175
...@@ -902,8 +902,10 @@ function annotation(text, detail){ ...@@ -902,8 +902,10 @@ function annotation(text, detail){
function scoreByText(text, keyWords, timeLen) { function scoreByText(text, keyWords, timeLen) {
const smallText = text.toLowerCase(); const smallText = text.toLowerCase();
let detailArr = [];
const detailArr = keyWords.toLowerCase().split(","); if(keyWords){
detailArr = keyWords.toLowerCase().split(",");
}
const mainArr = []; const mainArr = [];
const speakedDetailWordArr = []; const speakedDetailWordArr = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment