Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #78 from victor-homyakov/patch-27

Merged nested if() into single expression
  • Loading branch information...
commit 291edcdfdabc79db39978ff974435c30924b69fa 2 parents b0b9c93 + 3edad4f
@savetheclocktower savetheclocktower authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/prototype/lang/enumerable.js
View
4 src/prototype/lang/enumerable.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.