chore (client): remove unnecessary non-null assertions

This commit is contained in:
naskya 2024-04-22 22:44:43 +09:00
parent a49f9c33ef
commit c6d0fe52d2
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
5 changed files with 6 additions and 6 deletions

View file

@ -8,7 +8,7 @@
<i :class="icon('ph-dots-three-outline')"></i>
</button>
<button
v-if="!hideFollowButton && isSignedIn(me) && me!.id != user.id"
v-if="!hideFollowButton && isSignedIn(me) && me.id != user.id"
v-tooltip="full ? null : `${state} ${user.name || user.username}`"
class="kpoogebi _button follow-button"
:class="{

View file

@ -53,7 +53,7 @@ const url = `/${canonical}`;
const isMe =
isSignedIn(me) &&
`@${props.username}@${toUnicode(props.host)}`.toLowerCase() ===
`@${me!.username}@${toUnicode(localHost)}`.toLowerCase();
`@${me.username}@${toUnicode(localHost)}`.toLowerCase();
</script>
<style lang="scss" scoped>

View file

@ -370,7 +370,7 @@ const reactButton = ref<HTMLElement | null>(null);
const appearNote = computed(() =>
isRenote ? (note.value.renote as NoteType) : note.value,
);
const isMyRenote = isSignedIn(me) && me!.id === note.value.userId;
const isMyRenote = isSignedIn(me) && me.id === note.value.userId;
// const showContent = ref(false);
const isDeleted = ref(false);
const muted = ref(

View file

@ -77,7 +77,7 @@ const hasRenotedBefore = ref(false);
if (isSignedIn(me)) {
os.api("notes/renotes", {
noteId: props.note.id,
userId: me!.id,
userId: me.id,
limit: 1,
}).then((res) => {
hasRenotedBefore.value = res.length > 0;

View file

@ -59,7 +59,7 @@
<div class="other">
<button
v-if="
isSignedIn(me) && me!.id === post.user.id
isSignedIn(me) && me.id === post.user.id
"
v-tooltip="i18n.ts.toEdit"
v-click-anime
@ -105,7 +105,7 @@
<MkAcct :user="post.user" />
</div>
<MkFollowButton
v-if="!isSignedIn(me) || me!.id != post.user.id"
v-if="!isSignedIn(me) || me.id != post.user.id"
:user="post.user"
:inline="true"
:transparent="false"