diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 47efccf74..223065864 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -84,8 +84,9 @@ function md_elocalStorage(editor,mdu,id){ var textStart = " 数据已于 " var text = textStart + h + ':' + m + ':' + s +" 保存 "; // 占位符 - if ($(id2).html() && $(id2).html() != ' ' && $(id2).html().startWith(textStart) == false) { - $(id2).html( $(id2).html().split(' (')[0] + ` (${text})`); + var oldHtml = $(id2).html(); + if (oldHtml && oldHtml != ' ' && oldHtml.startsWith(textStart) == false) { + $(id2).html( oldHtml.split(' (')[0] + ` (${text})`); } else { $(id2).html(text); }