1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 21:52:27 +01:00

make sure all calls to command actions use sensible defaults

This commit is contained in:
Doug Kearns
2008-09-29 09:40:52 +00:00
parent 0653ae1473
commit ce3cc55944
2 changed files with 6 additions and 4 deletions

View File

@@ -86,6 +86,11 @@ liberator.Command.prototype = {
execute: function (args, special, count, modifiers)
{
// XXX
special = !!special;
count = (count === undefined) ? -1 : count;
modifiers = modifiers || {};
// whenever the user specifies special options or fixed number of arguments
// we use our args parser instead of passing a string to the callback
if (this.options.length > 0 || this.argCount)