From f0833cffe9342cca0dc4ea7420acee56e686f643 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Thu, 28 Aug 2025 19:47:58 +0900 Subject: refactor --- packages/frontend/src/components/global/MkAvatar.vue | 1 - packages/frontend/src/components/global/RouterView.vue | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'packages/frontend/src/components') diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index 8a9cc5286a..c2548cc7be 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -84,7 +84,6 @@ const bound = computed(() => props.link : {}); const url = computed(() => { - if (props.user.avatarUrl == null) return null; if (prefer.s.disableShowingAnimatedImages || prefer.s.dataSaver.avatar) return getStaticImageUrl(props.user.avatarUrl); return props.user.avatarUrl; }); diff --git a/packages/frontend/src/components/global/RouterView.vue b/packages/frontend/src/components/global/RouterView.vue index 3a508eaca0..d42beb531d 100644 --- a/packages/frontend/src/components/global/RouterView.vue +++ b/packages/frontend/src/components/global/RouterView.vue @@ -54,14 +54,10 @@ router.useListener('change', ({ resolved }) => { if (resolved == null || 'redirect' in resolved.route) return; if (resolved.route.path === currentRoutePath && deepEqual(resolved.props, currentPageProps.value)) return; - function _() { - currentPageComponent.value = resolved.route.component; - currentPageProps.value = resolved.props; - key.value = router.getCurrentFullPath(); - currentRoutePath = resolved.route.path; - } - - _(); + currentPageComponent.value = resolved.route.component; + currentPageProps.value = resolved.props; + key.value = router.getCurrentFullPath(); + currentRoutePath = resolved.route.path; }); -- cgit v1.2.3-freya