Skip to content

Commit

Permalink
fix jshint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 13, 2013
1 parent 4354f42 commit b973aa2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -40,8 +40,8 @@ function jsonp(url, opts, fn){
fn = opts;
opts = {};
}
if (!opts) opts = {};

var opts = opts || {};
var param = opts.param || 'callback';
var timeout = null != opts.timeout ? opts.timeout : 60000;
var enc = encodeURIComponent;
Expand All @@ -55,7 +55,7 @@ function jsonp(url, opts, fn){
if (timeout) {
timer = setTimeout(function(){
cleanup();
fn && fn(new Error('Timeout'));
if (fn) fn(new Error('Timeout'));
}, timeout);
}

Expand All @@ -68,7 +68,7 @@ function jsonp(url, opts, fn){
debug('jsonp got', data);
if (timer) clearTimeout(timer);
cleanup();
fn && fn(null, data);
if (fn) fn(null, data);
};

// add qs component
Expand Down

0 comments on commit b973aa2

Please sign in to comment.