From 93b78722d892256c7e88b0788b8cb784407f3906 Mon Sep 17 00:00:00 2001 From: chromakode Date: Wed, 6 Apr 2011 04:11:34 -0700 Subject: [PATCH] Fall back properly in Action.addToArgs if no args argument is passed in. Thanks to slyf for finding this issue. --- modules/utils/action/action.jsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utils/action/action.jsm b/modules/utils/action/action.jsm index 4937c89..7b00da1 100644 --- a/modules/utils/action/action.jsm +++ b/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); }