Index: chrome/browser/resources/settings/internet_page/internet_subpage.js |
diff --git a/chrome/browser/resources/settings/internet_page/internet_subpage.js b/chrome/browser/resources/settings/internet_page/internet_subpage.js |
index 24c3483b18789144f5a9d60612857bb7a61f1159..c02bab27df7fd14f370538afe12304d46a01b0a3 100644 |
--- a/chrome/browser/resources/settings/internet_page/internet_subpage.js |
+++ b/chrome/browser/resources/settings/internet_page/internet_subpage.js |
@@ -31,7 +31,10 @@ Polymer({ |
* Device state for the network type. |
* @type {?DeviceStateProperties|undefined} |
dschuyler
2017/03/20 19:11:30
Can this be undefined, or will it either be null o
stevenjb
2017/03/24 21:00:03
Done.
|
*/ |
- deviceState: Object, |
+ deviceState: { |
+ type: Object, |
+ value: null, |
+ }, |
/** @type {!chrome.networkingPrivate.GlobalPolicy|undefined} */ |
globalPolicy: Object, |
@@ -175,6 +178,8 @@ Polymer({ |
configured: false |
}; |
this.networkingPrivate.getNetworks(filter, function(networkStates) { |
+ if (!this.deviceState) |
+ return; |
if (this.deviceState.Type != CrOnc.Type.VPN) { |
this.networkStateList_ = networkStates; |
return; |
@@ -294,6 +299,7 @@ Polymer({ |
/** @private */ |
onAddButtonTap_: function() { |
+ assert(this.deviceState); |
chrome.send('addNetwork', [this.deviceState.Type]); |
}, |