Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Merged nested if() into single expression #78

Merged
merged 1 commit into from

2 participants

@victor-homyakov

No description provided.

@savetheclocktower savetheclocktower merged commit 291edcd into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 23, 2012
  1. @victor-homyakov
This page is out of date. Refresh to see the latest.
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) {
Something went wrong with that request. Please try again.