Comment 2 for bug 520632

Revision history for this message
Dan Scott (denials) wrote :

The org unit names are generated in an array of arrays in alphabetical order in OrgTree.js. There is no sorting code in the OPAC, the browser just iterates through the array elements in order and displays the contents. I suspect that Chrom(e|ium)'s V8 JavaScript engine optimizes the array by changing the order of the elements using the first integer within the contained arrays (in the assumption that the elements will be accessed in numerical order).

And some Googling shows... http://code.google.com/p/v8/issues/detail?id=6 - "No one should ever use a for..in loop on an array anyway". Guess what we're using in org_utils.js?