mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[Framework] Slice arguments correctly
Fix arguments-to-array conversions used for extension registration. WTD-518.
This commit is contained in:
parent
7388f4e8bf
commit
22034d3305
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user