diff --git a/samples/analytics/v3/auth_util.js b/samples/analytics/v3/auth_util.js index 8b5fac4..8221565 100644 --- a/samples/analytics/v3/auth_util.js +++ b/samples/analytics/v3/auth_util.js @@ -66,7 +66,7 @@ function checkAuth() { * to their data. If it exists, the user has authorized access. */ function handleAuthResult(authResult) { - if (authResult) { + if (authResult && !authResult.error) { gapi.client.load('analytics', 'v3', handleAuthorized); } else { handleUnauthorized();