Skip to content

Commit d906322

Browse files
committed
fix(iam): fix account existed problem
1 parent 39ecdfb commit d906322

File tree

1 file changed

+5
-2
lines changed
  • server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/src

1 file changed

+5
-2
lines changed

server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/src/IAMAction.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const IAMAction: React.FC = React.memo(() => {
2626

2727
const payload = event.data;
2828

29-
if (payload.type === 'exist') {
29+
if (payload.type === 'existed') {
3030
showToasts(Translate.accountExistedTip, 'warning');
3131
} else if (payload.type === 'token') {
3232
const token = payload.token;
@@ -35,9 +35,12 @@ export const IAMAction: React.FC = React.memo(() => {
3535
.then(() => {
3636
navigate('/main');
3737
})
38-
.catch(() => {
38+
.catch((err) => {
39+
console.error(err);
3940
showToasts(Translate.loginFailed, 'error');
4041
});
42+
} else {
43+
console.warn('Unknown payload type', payload.type);
4144
}
4245
}
4346
};

0 commit comments

Comments
 (0)