Fix some typescript issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-07-12 12:05:27 +02:00
parent 8f4099ee33
commit 5d29927b83
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 9 additions and 5 deletions

View File

@ -260,7 +260,11 @@
<!-- Events close to you --> <!-- Events close to you -->
<section <section
class="events-close" class="events-close"
v-if="canShowCloseEvents && loggedUserSettings.location?.range" v-if="
canShowCloseEvents &&
loggedUserSettings.location &&
loggedUserSettings.location.range
"
> >
<h2 class="title"> <h2 class="title">
{{ $t("Events nearby") }} {{ $t("Events nearby") }}
@ -269,10 +273,10 @@
{{ {{
$tc( $tc(
"Within {number} kilometers of {place}", "Within {number} kilometers of {place}",
loggedUserSettings.location?.range, loggedUserSettings.location.range,
{ {
number: loggedUserSettings.location?.range, number: loggedUserSettings.location.range,
place: loggedUserSettings.location?.name, place: loggedUserSettings.location.name,
} }
) )
}} }}
@ -490,7 +494,7 @@ export default class Home extends Vue {
} }
// eslint-disable-next-line class-methods-use-this // eslint-disable-next-line class-methods-use-this
isToday(date: Date): boolean { isToday(date: Date | string): boolean {
return new Date(date).toDateString() === new Date().toDateString(); return new Date(date).toDateString() === new Date().toDateString();
} }