Skip to content

Commit

Permalink
Merge pull request #78 from victor-homyakov/patch-27
Browse files Browse the repository at this point in the history
Merged nested if() into single expression
  • Loading branch information
savetheclocktower committed Nov 2, 2012
2 parents b0b9c93 + 3edad4f commit 291edcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prototype/lang/enumerable.js
Expand Up @@ -402,8 +402,8 @@ var Enumerable = (function() {
* // -> true ('3' == 3)
**/
function include(object) {
if (Object.isFunction(this.indexOf))
if (this.indexOf(object) != -1) return true;
if (Object.isFunction(this.indexOf) && this.indexOf(object) != -1)
return true;

var found = false;
this.each(function(value) {
Expand Down

0 comments on commit 291edcd

Please sign in to comment.