Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

typeof always return string so there is no need for strong equality, …

…simple equality enough (economy of one symbol, but we want Zepto to be small as possible)
  • Loading branch information...
commit 1fe9f96172de18f6b35bcf479bfc6c9efc589920 1 parent a1c01b7
slavic authored committed
Showing with 3 additions and 3 deletions.
  1. +1 −1  src/polyfill.js
  2. +2 −2 src/zepto.js
View
2  src/polyfill.js
@@ -7,7 +7,7 @@ if (Array.prototype.reduce === undefined)
Array.prototype.reduce = function(fun){
if(this === void 0 || this === null) throw new TypeError();
var t = Object(this), len = t.length >>> 0, k = 0, accumulator;
- if(typeof fun !== 'function') throw new TypeError();
+ if(typeof fun != 'function') throw new TypeError();
if(len == 0 && arguments.length == 1) throw new TypeError();
if(arguments.length >= 2)
View
4 src/zepto.js
@@ -32,7 +32,7 @@ var Zepto = (function() {
function $(selector, context){
if (!selector) return Z();
if (context !== undefined) return $(context).find(selector);
- else if (typeof selector === 'function') return $(document).ready(selector);
+ else if (typeof selector == 'function') return $(document).ready(selector);
else if (selector instanceof Z) return selector;
else {
var dom;
@@ -85,7 +85,7 @@ var Zepto = (function() {
});
else {
var ignores = slice.call(
- typeof selector === 'string' ?
+ typeof selector == 'string' ?
this.filter(selector) :
selector instanceof NodeList ? selector : $(selector));
slice.call(this).forEach(function(el){
Please sign in to comment.
Something went wrong with that request. Please try again.