Commit 24daa462 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS Network] Fix <network-config> spinner.

Spinner functionality in <network-config> broke due to a refactor [1]
which started using a template with if="[[!managedProperties_]]".
However, managedProperties_ starts out as undefined, and Polymer does
not evaluate if's whose properties are all undefined [2]. Since, in this
case, the managedProperties_ property is the only one used, all of the
properties are undefined, and the template was never evaluated until the
properties were received and the spinner was no longer needed.

This CL fixes the issue by explicitly using null instead of undefined in
this case.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1803724
[2] https://polymer-library.polymer-project.org/2.0/docs/devguide/observers#observers-and-element-initialization

Fixed: 1014057
Change-Id: I1f8775fc3136387508959f1fc914aa564434fac7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879752Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709204}
parent 42749713
......@@ -93,8 +93,11 @@ Polymer({
notify: true,
},
/** @private {!chromeos.networkConfig.mojom.ManagedProperties|undefined} */
managedProperties_: Object,
/** @private {?chromeos.networkConfig.mojom.ManagedProperties} */
managedProperties_: {
type: Object,
value: null,
},
/**
* Managed EAP properties used for determination of managed EAP fields.
......@@ -346,7 +349,7 @@ Polymer({
init: function() {
this.mojoType_ = undefined;
this.vpnType_ = undefined;
this.managedProperties_ = undefined;
this.managedProperties_ = null;
this.configProperties_ = undefined;
this.propertiesSent_ = false;
this.selectedServerCaHash_ = undefined;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment