diff --git a/public/javascripts/docs.js b/public/javascripts/docs.js index dfcae90e..5812d0d0 100644 --- a/public/javascripts/docs.js +++ b/public/javascripts/docs.js @@ -157,13 +157,13 @@ $('section.credentials').removeClass('authed'); if (params[1].name == 'oauth') { $.post('auth', params, function(result) { - if (result.signin) { + if (result && result.signin) { window.open(result.signin,"_blank","height=900,width=800,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0"); } }) } else if (params[1].name == 'oauth2') { $.post('auth2', params, function(result) { - if (result.signin) { + if (result && result.signin) { window.open(result.signin,"_blank","height=900,width=800,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0"); } else if (result.implicit) { @@ -272,7 +272,7 @@ $.post('processReq', params, function(result, text) { // If we get passed a signin property, open a window to allow the user to signin/link their account - if (result.signin) { + if (result && result.signin) { window.open(result.signin,"_blank","height=900,width=800,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0"); } else { var response,