Skip to content

Commit 8a3896e

Browse files
committed
fix clients that don't support deeplinking
...from showing a broken continue button
1 parent df9087b commit 8a3896e

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/open/ClientViewModel.js

+17-14
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,23 @@ export class ClientViewModel extends ViewModel {
6262
}
6363
}
6464
const actions = [];
65-
actions.push({
66-
label: deepLinkLabel,
67-
url: this._client.getDeepLink(this._proposedPlatform, this._link),
68-
primary: true,
69-
activated: () => {
70-
this._pickClient(this._client);
71-
this.preferences.setClient(this._client.id, this._proposedPlatform);
72-
// only show install screen if we tried to open a native deeplink
73-
if (this._showOpen && this._proposedPlatform === this._nativePlatform) {
74-
this._showOpen = false;
75-
this.emitChange();
76-
}
77-
},
78-
});
65+
const proposedDeepLink = this._client.getDeepLink(this._proposedPlatform, this._link);
66+
if (proposedDeepLink) {
67+
actions.push({
68+
label: deepLinkLabel,
69+
url: proposedDeepLink,
70+
primary: true,
71+
activated: () => {
72+
this._pickClient(this._client);
73+
this.preferences.setClient(this._client.id, this._proposedPlatform);
74+
// only show install screen if we tried to open a native deeplink
75+
if (this._showOpen && this._proposedPlatform === this._nativePlatform) {
76+
this._showOpen = false;
77+
this.emitChange();
78+
}
79+
},
80+
});
81+
}
7982
// show only if there is a preferred instance, and if we don't already link to it in the first button
8083
if (hasPreferredWebInstance && this._webPlatform && this._proposedPlatform !== this._webPlatform) {
8184
actions.push({

0 commit comments

Comments
 (0)