mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 22:24:18 +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
|
// Echo arguments; used to represent groups of non-built-in
|
||||||
// extensions as a single dependency.
|
// extensions as a single dependency.
|
||||||
function echo() {
|
function echo() {
|
||||||
return arguments.slice();
|
return Array.prototype.slice.call(arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always return a static value; used to represent plain
|
// Always return a static value; used to represent plain
|
||||||
|
@ -27,10 +27,10 @@ define(
|
|||||||
function PartialConstructor(Constructor) {
|
function PartialConstructor(Constructor) {
|
||||||
|
|
||||||
return function () { // Bind services
|
return function () { // Bind services
|
||||||
var dependencies = arguments.slice();
|
var dependencies = Array.prototype.slice.call(arguments);
|
||||||
|
|
||||||
return function () { // Bind everything else
|
return function () { // Bind everything else
|
||||||
var other = arguments.slice(),
|
var other = Array.prototype.slice.call(arguments),
|
||||||
instance = {};
|
instance = {};
|
||||||
|
|
||||||
Constructor.apply(instance, dependencies.concat(other));
|
Constructor.apply(instance, dependencies.concat(other));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user