Skip to content
Snippets Groups Projects
Commit 163f405a authored by Bruno Windels's avatar Bruno Windels
Browse files

ensure the preferred platform is supported

parent 533b1374
Branches
Tags
No related merge requests found
...@@ -42,7 +42,8 @@ export class ClientViewModel extends ViewModel { ...@@ -42,7 +42,8 @@ export class ClientViewModel extends ViewModel {
const matchingPlatforms = getMatchingPlatforms(this._client, this.platforms); const matchingPlatforms = getMatchingPlatforms(this._client, this.platforms);
this._webPlatform = matchingPlatforms.find(p => isWebPlatform(p)); this._webPlatform = matchingPlatforms.find(p => isWebPlatform(p));
this._nativePlatform = matchingPlatforms.find(p => !isWebPlatform(p)); this._nativePlatform = matchingPlatforms.find(p => !isWebPlatform(p));
this._proposedPlatform = this.preferences.platform || this._nativePlatform || webPlatform; const preferredPlatform = matchingPlatforms.find(p => p === this.preferences.platform);
this._proposedPlatform = preferredPlatform || this._nativePlatform || webPlatform;
this.openActions = this._createOpenActions(); this.openActions = this._createOpenActions();
this.installActions = this._createInstallActions(); this.installActions = this._createInstallActions();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment