Skip to content

Commit d8c6816

Browse files
committed
修复getCInfo的长度判断警告
1 parent bd3df02 commit d8c6816

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/checkessay.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ function genEssayArr(essay)
190190

191191
function getCInfo(c)
192192
{
193-
if (c.length > 1) {
193+
if (Array.from(c).length > 1) {
194194
console.warn("警告:输入的长度超过1。超出部都会被忽略");
195-
c = c[0];
195+
c = Array.from(c)[0];
196196
}
197197

198198
if ( ! charsCInfoCache [c] )

0 commit comments

Comments
 (0)