| Index: remoting/webapp/host_settings.js
|
| diff --git a/remoting/webapp/host_settings.js b/remoting/webapp/host_settings.js
|
| index 9fa43b690bd02da1d9cf6f7528cbf81c1f36f86a..c2dee6286371008e7e54b5c9d76962f81f6da2b7 100644
|
| --- a/remoting/webapp/host_settings.js
|
| +++ b/remoting/webapp/host_settings.js
|
| @@ -81,14 +81,17 @@ remoting.HostSettings.loadInternal_ = function(hostId, callback) {
|
| var onDone = function(allHosts) {
|
| var result = {};
|
| try {
|
| - result = jsonParseSafe(allHosts[remoting.HostSettings.KEY_]);
|
| - if (typeof(result) != 'object') {
|
| - console.error("Error loading host settings: Not an object");
|
| - result = {};
|
| - } else if (/** @type {Object} */ (result).hasOwnProperty(hostId) &&
|
| - typeof(result[hostId]) == 'object') {
|
| - callback(result[hostId], result);
|
| - return;
|
| + var hosts = allHosts[remoting.HostSettings.KEY_];
|
| + if (hosts) {
|
| + result = jsonParseSafe(hosts);
|
| + if (typeof(result) != 'object') {
|
| + console.error("Error loading host settings: Not an object");
|
| + result = {};
|
| + } else if (/** @type {Object} */ (result).hasOwnProperty(hostId) &&
|
| + typeof(result[hostId]) == 'object') {
|
| + callback(result[hostId], result);
|
| + return;
|
| + }
|
| }
|
| } catch (err) {
|
| var typedErr = /** @type {*} */ (err);
|
|
|