Move assignment of the operating system property (#786)

This commit is contained in:
toasted-nutbread 2020-09-08 19:36:15 -04:00 committed by GitHub
parent 46af4c9da4
commit ab4dbacc4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,9 @@ class ProfileController {
}
async prepare() {
const {platform: {os}} = await api.getEnvironmentInfo();
this._profileConditionsUI.os = os;
$('#profile-target').change(this._onTargetProfileChanged.bind(this));
$('#profile-name').change(this._onNameChanged.bind(this));
$('#profile-add').click(this._onAdd.bind(this));
@ -47,9 +50,6 @@ class ProfileController {
// Private
async _onOptionsChanged() {
const {platform: {os}} = await api.getEnvironmentInfo();
this._profileConditionsUI.os = os;
const optionsFull = await this._settingsController.getOptionsFullMutable();
this._formWrite(optionsFull);
}