Permalink
Browse files

Merged nested if() into single expression

  • Loading branch information...
1 parent d017062 commit 3edad4f223f30fa3a3f912e78381dd9318a17846 @victor-homyakov victor-homyakov committed Oct 23, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 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) {

0 comments on commit 3edad4f

Please sign in to comment.