diff --git a/js/id/core/connection.js b/js/id/core/connection.js index 7cd2299a9..d4116b992 100644 --- a/js/id/core/connection.js +++ b/js/id/core/connection.js @@ -255,7 +255,7 @@ iD.Connection = function() { var u = user_details.getElementsByTagName('user')[0], img = u.getElementsByTagName('img'), image_url = ''; - if (img && img[0].getAttribute('href')) { + if (img && img[0] && img[0].getAttribute('href')) { image_url = img[0].getAttribute('href'); } callback(undefined, connection.user({