septs says to YSITD
如果 nick 是 string 的话。 建议修改为 new RegExp(...). test(nick) 因为你输入的 nick 可能是 undefined / null。 当然在进入时预判处理掉是最好的。