Skip to content

Commit

Permalink
fix: try to fix #2422
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed May 26, 2024
1 parent 4a18bc3 commit 1a965a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/client/src/components/CommentBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ watch(
useEventListener('click', popupHandler);
useEventListener(
'message',
({ data }: { data: { type: 'profile'; data: UserInfo } }): void => {
async ({ data }: { data: { type: 'profile'; data: UserInfo } }) => {
if (!data || data.type !== 'profile') return;
userInfo.value = { ...userInfo.value, ...data.data };
Expand All @@ -454,6 +454,9 @@ useEventListener(
.forEach((store) =>
store.setItem('WALINE_USER', JSON.stringify(userInfo)),
);
// try add nextTrick to fix https://github.com/walinejs/waline/issues/2422 some user login will not refresh client UI.
await nextTick();
},
);
Expand Down

0 comments on commit 1a965a7

Please sign in to comment.