Force NetworkConfig.securityType_ to be an enum, not a string
When we converted network_config.js to use == instead of ===, we broke some subtle logic when using <network-config-select> with enum values: The <option> children of the <select> element will always have a string value, even if the value is set to a number. Thus the data binding will quietly replace the enums with strings. Thus was fine when using == (since "2" == 2 in JS) but breaks with ===. Since securityType_ is the only place where we use network-config-select with an enum, the simplest fix is to force it to an enum in updateSecurity_(). If we use network-config-select for any more enums, we should fix it to do the conversion if the items are numbers and not strings. Bug: 1046149 Change-Id: Iacdf4f45296483311566ab1b0748d6947ca1429b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027067Reviewed-by:Jon Mann <jonmann@chromium.org> Commit-Queue: Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#736540}
Showing
Please register or sign in to comment