From f2cb797ae264089deab61052f1c3bed38d6f785f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Aug 2014 08:57:26 -0400 Subject: [PATCH] feature(console) regExp: match -> test --- lib/server/console.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/console.js b/lib/server/console.js index 315fa95a..11732ba2 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -112,8 +112,8 @@ connName, ret, isVolume = win.isChangeVolume(command), - isCD = command.match(new RegExp('^cd ?')), - isCDWin = command.match(new RegExp('^cd ?', 'i')), + isCD = /^cd ?/.test(command), + isCDWin = /^cd ?/i.test(command), symbolsExec = ['*', '&', '{', '}', '|', '\'', '"', ';'], isSymbol = Util.isContainStr(command, symbolsExec),