Index: remoting/webapp/wcs_loader.js |
diff --git a/remoting/webapp/wcs_loader.js b/remoting/webapp/wcs_loader.js |
index 54fd3cc2704bf0c382307f4d10415068f2c1304a..fdd37365ae13eb91f6b1a5f216548675431537e6 100644 |
--- a/remoting/webapp/wcs_loader.js |
+++ b/remoting/webapp/wcs_loader.js |
@@ -41,9 +41,14 @@ remoting.WcsLoader.load = function(onReady) { |
if (!remoting.wcsLoader) { |
remoting.wcsLoader = new remoting.WcsLoader(); |
} |
- /** @param {string} token The OAuth2 access token. */ |
+ /** @param {string?} token The OAuth2 access token. */ |
var start = function(token) { |
- remoting.wcsLoader.start_(token, onReady); |
+ if (token) { |
+ remoting.wcsLoader.start_(token, onReady); |
+ } else { |
+ console.error('WcsLoader: Authentication failed.'); |
+ onReady(null); |
+ } |
}; |
remoting.oauth2.callWithToken(start); |
}; |