Permalink
Browse files

Don't need success anymore

  • Loading branch information...
1 parent 281bfb2 commit 63ec6d38bc036bd172623166a3815a32de9013da Gabriel Farrell committed Apr 25, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 routes/index.js
View
@@ -229,9 +229,9 @@ module.exports = function(app) {
if (apiRes.statusCode != 200) return next();
var parsed = JSON.parse(body);
// XXX this is kinda fragile says Mike
- var id = Object.keys(parsed.success)[0];
- if (parsed.success && parsed.success[id]) {
- var loc = parsed.success[id];
+ var id = Object.keys(parsed)[0];
+ if (parsed && parsed[id]) {
+ var loc = parsed[id];
} else {
return next();
}

0 comments on commit 63ec6d3

Please sign in to comment.