We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d017062 commit 3edad4fCopy full SHA for 3edad4f
src/prototype/lang/enumerable.js
@@ -402,8 +402,8 @@ var Enumerable = (function() {
402
* // -> true ('3' == 3)
403
**/
404
function include(object) {
405
- if (Object.isFunction(this.indexOf))
406
- if (this.indexOf(object) != -1) return true;
+ if (Object.isFunction(this.indexOf) && this.indexOf(object) != -1)
+ return true;
407
408
var found = false;
409
this.each(function(value) {
0 commit comments