Array.concat does not exist in all browsers.

[].concat can be used instead of Array.concat, and this works in Firefox and Chrome (and reportedly on IE8/9).
This commit is contained in:
Njal Karevoll 2011-08-15 10:27:25 +02:00
parent 61867d69e7
commit 04c5c5aab8

View File

@ -174,7 +174,7 @@ var Search = {
// lookup as object // lookup as object
for (var i = 0; i < objectterms.length; i++) { for (var i = 0; i < objectterms.length; i++) {
var others = Array.concat(objectterms.slice(0,i), var others = [].concat(objectterms.slice(0,i),
objectterms.slice(i+1, objectterms.length)) objectterms.slice(i+1, objectterms.length))
var results = this.performObjectSearch(objectterms[i], others); var results = this.performObjectSearch(objectterms[i], others);
// Assume first word is most likely to be the object, // Assume first word is most likely to be the object,