Skip to content

Commit 597c6c0

Browse files
sophiebitsepriestley
authored andcommitted
Switch back to janky array copying
Summary: Bad news @cpojer @tomo. IE8 doesn't like you. Test Plan: Load a diff in IE8; see changes and don't get JS errors. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, tomo, Korvin, cpojer Differential Revision: https://secure.phabricator.com/D8728
1 parent a7272df commit 597c6c0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

resources/celerity/map.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'differential.pkg.js' => '11a5b750',
1515
'diffusion.pkg.css' => '3783278d',
1616
'diffusion.pkg.js' => '5b4010f4',
17-
'javelin.pkg.js' => 'ec6c9ac3',
17+
'javelin.pkg.js' => 'a10417f3',
1818
'maniphest.pkg.css' => 'f1887d71',
1919
'maniphest.pkg.js' => '2fe8af22',
2020
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
@@ -178,7 +178,7 @@
178178
'rsrc/externals/javelin/core/init.js' => 'b88ab49e',
179179
'rsrc/externals/javelin/core/init_node.js' => 'd7dde471',
180180
'rsrc/externals/javelin/core/install.js' => '52a92793',
181-
'rsrc/externals/javelin/core/util.js' => 'e1d96281',
181+
'rsrc/externals/javelin/core/util.js' => '65b0b249',
182182
'rsrc/externals/javelin/docs/Base.js' => '897bb199',
183183
'rsrc/externals/javelin/docs/onload.js' => '81fb4862',
184184
'rsrc/externals/javelin/ext/fx/Color.js' => '7e41274a',
@@ -655,7 +655,7 @@
655655
'javelin-typeahead-source' => '62e18640',
656656
'javelin-typeahead-static-source' => 'cdde23f1',
657657
'javelin-uri' => 'd9a9b862',
658-
'javelin-util' => 'e1d96281',
658+
'javelin-util' => '65b0b249',
659659
'javelin-vector' => '403a3dce',
660660
'javelin-view' => '0f764c35',
661661
'javelin-view-html' => 'e5b406f9',

webroot/rsrc/externals/javelin/core/util.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ JX.$E = function(message) {
4949
* @group util
5050
*/
5151
JX.$A = function(object) {
52-
return Array.prototype.slice.call(object);
52+
// IE8 throws "JScript object expected" when trying to call
53+
// Array.prototype.slice on a NodeList, so just copy items one by one here.
54+
var r = [];
55+
for (var ii = 0; ii < object.length; ii++) {
56+
r.push(object[ii]);
57+
}
58+
return r;
5359
};
5460

5561

0 commit comments

Comments
 (0)