mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 15:28:00 +01:00
Remove some silly argument guard clauses.
Removed from Command(), Mapping() and Option(). Throw an exception if you care enough to check but we don't do so anywhere else.
This commit is contained in:
@@ -53,9 +53,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
function Command(specs, description, action, extraInfo) //{{{
|
||||
{
|
||||
if (!specs || !action)
|
||||
return null;
|
||||
|
||||
if (!extraInfo)
|
||||
extraInfo = {};
|
||||
|
||||
|
||||
@@ -49,9 +49,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*/
|
||||
function Map(modes, keys, description, action, extraInfo) //{{{
|
||||
{
|
||||
if (!modes || (!keys || !keys.length) || !action)
|
||||
return null;
|
||||
|
||||
if (!extraInfo)
|
||||
extraInfo = {};
|
||||
|
||||
|
||||
@@ -32,9 +32,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
// options.add() instead
|
||||
function Option(names, description, type, defaultValue, extraInfo) //{{{
|
||||
{
|
||||
if (!names || !type)
|
||||
return null;
|
||||
|
||||
if (!extraInfo)
|
||||
extraInfo = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user