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

View File

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