[Framework] Slice arguments correctly

Fix arguments-to-array conversions used for extension
registration. WTD-518.
This commit is contained in:
Victor Woeltjen 2014-11-05 12:36:31 -08:00
parent 7388f4e8bf
commit 22034d3305
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ define(
// Echo arguments; used to represent groups of non-built-in
// extensions as a single dependency.
function echo() {
return arguments.slice();
return Array.prototype.slice.call(arguments);
}
// Always return a static value; used to represent plain

View File

@ -27,10 +27,10 @@ define(
function PartialConstructor(Constructor) {
return function () { // Bind services
var dependencies = arguments.slice();
var dependencies = Array.prototype.slice.call(arguments);
return function () { // Bind everything else
var other = arguments.slice(),
var other = Array.prototype.slice.call(arguments),
instance = {};
Constructor.apply(instance, dependencies.concat(other));