Navigation Menu

Skip to content

Commit

Permalink
Using _isArray and $.inArray - see quirkey#115
Browse files Browse the repository at this point in the history
  • Loading branch information
flashingpumpkin committed Nov 16, 2011
1 parent a7e8c4e commit 45d2adf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sammy.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 45d2adf

Please sign in to comment.