View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/684 Closes #741 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
669e5c6ca0
1 changed files with 8 additions and 3 deletions
|
@ -107,12 +107,17 @@ const props = withDefaults(defineProps<{
|
||||||
});
|
});
|
||||||
|
|
||||||
function onUsernameChange(): void {
|
function onUsernameChange(): void {
|
||||||
|
const usernameRequested = username.value;
|
||||||
misskeyApi('users/show', {
|
misskeyApi('users/show', {
|
||||||
username: username.value,
|
username: usernameRequested,
|
||||||
}).then(userResponse => {
|
}).then(userResponse => {
|
||||||
|
if (userResponse.username === username.value) {
|
||||||
user.value = userResponse;
|
user.value = userResponse;
|
||||||
|
}
|
||||||
}, () => {
|
}, () => {
|
||||||
|
if (usernameRequested === username.value) {
|
||||||
user.value = null;
|
user.value = null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue