diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 7405e72d..c77e7ade 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -111,7 +111,12 @@ var Base = this.Base = new function() { return val.valueOf(); } } - if (beans && (bean = name.match(/^(get|is)(([A-Z])(.*))$/))) + // Only add getter beans if they do not expect arguments + // Functions that should function both with optional + // arguments and as beans should not declare the parameters + // and use the arguments array internally instead. + if (beans && val.length == 0 + && (bean = name.match(/^(get|is)(([A-Z])(.*))$/))) beans.push([ bean[3].toLowerCase() + bean[4], bean[2] ]); } if (!res || func || !res.get && !res.set)