Skip to content

Commit

Permalink
Fix 304 causes error
Browse files Browse the repository at this point in the history
304 cause error where would try to check headers when they were
undefined.
  • Loading branch information
BHare1985 committed Jun 13, 2016
1 parent c75b445 commit 95090c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ module.exports = function(opts){
return;
}

res.header(headers);
if(headers['Content-Type'] === 'application/json') {
return res.jsonp(tile);
}
if(headers) {
res.header(headers);
if(headers['Content-Type'] === 'application/json') {
return res.jsonp(tile);
}
}

return res.send(tile);
}
);
Expand Down

0 comments on commit 95090c3

Please sign in to comment.