From 358879209e1091cf749d2b4ab8e5a2d0512705c5 Mon Sep 17 00:00:00 2001 From: Evan Dancer Date: Sun, 30 Apr 2017 15:18:59 -0400 Subject: [PATCH] Use Array.isArray to check if query is an array --- lib/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api.js b/lib/api.js index c49b4d8..15a81f0 100644 --- a/lib/api.js +++ b/lib/api.js @@ -655,7 +655,7 @@ SearchForm.prototype = { return this.set("q", query); } else { var predicates; - if (query.constructor === Array && query.length > 0 && query[0].constructor === Array) { + if (Array.isArray(query) && query.length > 0 && Array.isArray(query[0])) { predicates = query; } else { predicates = [].slice.apply(arguments); // Convert to a real JS array