Bug 342852 - Display an error if only "/" entered, instead of throwing a JS exception.

ChatZilla only.
r=samuel


git-svn-id: svn://10.0.0.236/trunk@203250 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
silver%warwickcompsoc.co.uk
2006-07-20 14:48:06 +00:00
parent 869ce04e86
commit 9de512857b

View File

@@ -354,6 +354,12 @@ function dispatch(text, e, isInteractive, flags)
/* split command from arguments */
var ary = text.match(/(\S+) ?(.*)/);
if (!ary)
{
display(getMsg(MSG_ERR_NO_COMMAND, ""));
return null;
}
e.commandText = ary[1];
if (ary[2])
e.inputData = stringTrim(ary[2]);