From 8af8abfc9fddbdb6a7202baeacbf1bb1a2068063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Tue, 3 Jan 2023 18:48:29 +0800 Subject: [PATCH] refactor: remove optional chainning & non-null assertion --- components/account/AccountHeader.vue | 2 +- ...ificationEnablePushNotification.client.vue | 2 +- .../NotificationPreferences.client.vue | 4 ++-- components/status/StatusActionsMore.vue | 2 +- components/status/StatusNotFound.vue | 2 +- components/timeline/TimelinePinned.vue | 2 +- .../push-notifications/usePushManager.ts | 24 +++++++++---------- composables/statusDrafts.ts | 2 +- composables/users.ts | 10 ++++---- pages/settings/profile/appearance.vue | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 6ec29559..436fb0bb 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -60,7 +60,7 @@ watchEffect(() => { iconFields.value = icons }) -const isSelf = $computed(() => checkUser(currentUser.value) && currentUser.value?.account.id === account.id) +const isSelf = $computed(() => checkUser(currentUser.value) && currentUser.value.account.id === account.id)