Permalink
Browse files

refactor res.format(), dont pass "default" to req.accepts()

  • Loading branch information...
1 parent 40be3ed commit 8edf358739447e259616adc474fc17c3e8e9dcff @tj tj committed Sep 3, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/response.js
View
@@ -451,12 +451,12 @@ res.type = function(type){
*/
res.format = function(obj){
- var keys = Object.keys(obj)
- , req = this.req
+ var req = this.req
, next = req.next;
var fn = obj.default;
if (fn) delete obj.default;
+ var keys = Object.keys(obj);
var key = req.accepts(keys);

0 comments on commit 8edf358

Please sign in to comment.