prevent a ReferenceError
before, we got: > ReferenceError: can't access lexical declaration 'followRequestDone' > before initialization (of course in non-dev mode, `followRequestDone` had a different name)
This commit is contained in:
@@ -210,6 +210,8 @@ const props = withDefaults(defineProps<{
|
||||
|
||||
const userDetailed: Ref<UserDetailed | null> = ref(null);
|
||||
|
||||
const followRequestDone = ref(true);
|
||||
|
||||
// watch() is required because computed() doesn't support async.
|
||||
watch(props, async () => {
|
||||
const type = props.notification.type;
|
||||
@@ -242,8 +244,6 @@ const exportEntityName = {
|
||||
userList: i18n.ts.lists,
|
||||
} as const satisfies Record<ExportCompletedNotification['exportedEntity'], string>;
|
||||
|
||||
const followRequestDone = ref(true);
|
||||
|
||||
const acceptFollowRequest = () => {
|
||||
if (!('user' in props.notification)) return;
|
||||
followRequestDone.value = true;
|
||||
|
||||
Reference in New Issue
Block a user