Fixed TS errors and warnings

This commit is contained in:
Ferdinand Thiessen 2020-11-10 01:40:50 +01:00
parent cfc46dddd3
commit 390e0fc95b
2 changed files with 3 additions and 5 deletions

View File

@ -8,13 +8,11 @@
</template>
<script lang="ts">
import { computed, defineComponent, onBeforeMount } from '@vue/composition-api';
import { BalanceInterface } from 'src/plugins/balance/store/balance';
import { Store } from 'vuex';
import { defineComponent } from '@vue/composition-api';
export default defineComponent({
name: 'DummyWidget',
setup(_, { root }) {
setup() {
function randomNumber(start: number, end: number) {
return start + Math.floor(Math.random() * Math.floor(end));
}

View File

@ -26,7 +26,7 @@ export default defineComponent({
setup(_, { root }) {
const store = <Store<StateInterface>>root.$store;
const avatarLink = computed(() => {
const hash = MD5(store.state.user.currentUser?.mail.trim());
const hash = MD5(store.state.user.currentUser?.mail || '').toString();
return `https://www.gravatar.com/avatar/${hash}?s=500&d=robohash`;
});