Permalink
Browse files

Fall back properly in Action.addToArgs if no args argument is passed …

…in. Thanks to slyf for finding this issue.
  • Loading branch information...
chromakode committed Apr 6, 2011
1 parent d2f4b7e commit 93b78722d892256c7e88b0788b8cb784407f3906
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/utils/action/action.jsm
@@ -64,7 +64,7 @@ ActionType.prototype = {
addToArgs: function(args) {
// Arguments contain the arguments passed to this function, with this action object at the end.
- var newargs = Array.prototype.splice.call(args, 0) || [];
+ var newargs = args ? Array.prototype.splice.call(args, 0) : [];
if ((newargs.length == 0) || (newargs[newargs.length-1] != this)) {
newargs.push(this);
}

0 comments on commit 93b7872

Please sign in to comment.