From f1d32dd65edd0e050fb0e9531aaf2316581afcdc Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 25 Apr 2013 12:16:32 -0700 Subject: [PATCH] Fix Uncaught TypeError: Cannot call method 'getAttribute' of undefined https://app.getsentry.com/id/id/group/5151824/ --- js/id/core/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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({