fix clients that don't support deeplinking

...from showing a broken continue button
This commit is contained in:
Bruno Windels 2021-02-04 17:11:10 +01:00
parent df9087ba17
commit 8a3896eef5

View File

@ -62,9 +62,11 @@ export class ClientViewModel extends ViewModel {
} }
} }
const actions = []; const actions = [];
const proposedDeepLink = this._client.getDeepLink(this._proposedPlatform, this._link);
if (proposedDeepLink) {
actions.push({ actions.push({
label: deepLinkLabel, label: deepLinkLabel,
url: this._client.getDeepLink(this._proposedPlatform, this._link), url: proposedDeepLink,
primary: true, primary: true,
activated: () => { activated: () => {
this._pickClient(this._client); this._pickClient(this._client);
@ -76,6 +78,7 @@ export class ClientViewModel extends ViewModel {
} }
}, },
}); });
}
// show only if there is a preferred instance, and if we don't already link to it in the first button // show only if there is a preferred instance, and if we don't already link to it in the first button
if (hasPreferredWebInstance && this._webPlatform && this._proposedPlatform !== this._webPlatform) { if (hasPreferredWebInstance && this._webPlatform && this._proposedPlatform !== this._webPlatform) {
actions.push({ actions.push({