diff options
Diffstat (limited to 'packages/frontend/src/components')
| -rw-r--r-- | packages/frontend/src/components/MkFlashPreview.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/components/global/RouterView.vue | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkFlashPreview.vue b/packages/frontend/src/components/MkFlashPreview.vue index f8f6143a7c..b7278ac742 100644 --- a/packages/frontend/src/components/MkFlashPreview.vue +++ b/packages/frontend/src/components/MkFlashPreview.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only <Mfm class="summaryMfm" :text="flash.summary" :plain="true" :nowrap="true"/> </p> <footer> - <img v-if="flash.user.avatarUrl != null" class="icon" :src="flash.user.avatarUrl"/> + <img class="icon" :src="flash.user.avatarUrl"/> <p>{{ userName(flash.user) }}</p> </footer> </article> diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue index 27f7b18559..3a508eaca0 100644 --- a/packages/frontend/src/components/global/RouterView.vue +++ b/packages/frontend/src/components/global/RouterView.vue @@ -30,19 +30,21 @@ const props = defineProps<{ router?: Router; }>(); -const router = props.router ?? inject(DI.router); +const _router = props.router ?? inject(DI.router); -if (router == null) { +if (_router == null) { throw new Error('no router provided'); } +const router = _router; + const viewId = randomId(); provide(DI.viewId, viewId); const currentDepth = inject(DI.routerCurrentDepth, 0); provide(DI.routerCurrentDepth, currentDepth + 1); -const current = router.current!; +const current = router.current; const currentPageComponent = shallowRef('component' in current.route ? current.route.component : MkLoadingPage); const currentPageProps = ref(current.props); let currentRoutePath = current.route.path; |