forked from potsda.mn/mobilizon
Fix a few typescript issues in Interact.vue
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
992077044a
commit
613ac1203b
|
@ -27,12 +27,10 @@ import RouteName from "../router/name";
|
||||||
skip() {
|
skip() {
|
||||||
try {
|
try {
|
||||||
const url = this.$route.query.url as string;
|
const url = this.$route.query.url as string;
|
||||||
new URL(url);
|
const uri = new URL(url);
|
||||||
return false;
|
return !(uri instanceof URL);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof TypeError) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async result({ data }) {
|
async result({ data }) {
|
||||||
|
@ -42,7 +40,7 @@ import RouteName from "../router/name";
|
||||||
data.searchEvents.elements.length > 0
|
data.searchEvents.elements.length > 0
|
||||||
) {
|
) {
|
||||||
const event = data.searchEvents.elements[0];
|
const event = data.searchEvents.elements[0];
|
||||||
return await this.$router.replace({
|
await this.$router.replace({
|
||||||
name: RouteName.EVENT,
|
name: RouteName.EVENT,
|
||||||
params: { uuid: event.uuid },
|
params: { uuid: event.uuid },
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue