1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-21 10:43:23 +00:00

Ignore regex URI when launching (#28)

* Do not launch regex URI

* Fix incorrect check

* More null checks
This commit is contained in:
ShirokaiLon
2019-02-08 13:01:08 +00:00
committed by Kyle Spearrin
parent 93244b5c90
commit 4aaf452883
2 changed files with 10 additions and 3 deletions

View File

@@ -31,11 +31,18 @@ export class LoginView implements View {
}
get canLaunch(): boolean {
return this.hasUris && this.uris[0].canLaunch;
return this.hasUris && this.uris.some(uri => uri.canLaunch);
}
get launchUri(): string {
return this.canLaunch ? this.uris[0].launchUri : null;
if (this.hasUris) {
const uri = this.uris.find(uri => uri.canLaunch)
if (uri != null) {
return uri.launchUri;
}
}
return null;
}
get hasUris(): boolean {