mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 15:30:58 +01:00
Use Array.prototype.slice in JX.$A
Summary: Being bold. I think it is fine to do this in 2011. Test Plan: Run the new specs. Reviewers: mroch, tomo, epriestley Reviewed By: epriestley Subscribers: chad, epriestley, aran Differential Revision: https://secure.phabricator.com/D835
This commit is contained in:
parent
9fedd343eb
commit
f36d504b75
1 changed files with 2 additions and 9 deletions
11
webroot/rsrc/externals/javelin/core/util.js
vendored
11
webroot/rsrc/externals/javelin/core/util.js
vendored
|
@ -48,15 +48,8 @@ JX.$E = function(message) {
|
|||
*
|
||||
* @group util
|
||||
*/
|
||||
JX.$A = function(mysterious_arraylike_object) {
|
||||
// NOTE: This avoids the Array.slice() trick because some bizarre COM object
|
||||
// I dug up somewhere was freaking out when I tried to do it and it made me
|
||||
// very upset, so do not replace this with Array.slice() cleverness.
|
||||
var r = [];
|
||||
for (var ii = 0; ii < mysterious_arraylike_object.length; ii++) {
|
||||
r.push(mysterious_arraylike_object[ii]);
|
||||
}
|
||||
return r;
|
||||
JX.$A = function(object) {
|
||||
return Array.prototype.slice.call(object);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue