diff --git a/lib/sammy.js b/lib/sammy.js index 4f8c5e26..cb9f596a 100644 --- a/lib/sammy.js +++ b/lib/sammy.js @@ -1118,14 +1118,14 @@ options = {path: options}; } // Do we have to match against multiple paths? - if (options.path instanceof Array){ + if (_isArray(options.path)){ var results, numopt, opts; results = []; for (numopt in options.path){ opts = $.extend({}, options, {path: options.path[numopt]}); results.push(this.contextMatchesOptions(context, opts)); } - var matched = results.indexOf(true) > -1 ? true : false; + var matched = $.inArray(true, results) > -1 ? true : false; return positive ? matched : !matched; } if (options.only) {