Skip to content

Commit 86ff2d3

Browse files
committed
🐞 fix: 修正进入密码房间取消报错
1 parent 1be28ad commit 86ff2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

game/frontend/src/views/Room.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function init() {
3737
}
3838
let passwd: string | undefined;
3939
if (room.attrs?.passwd && !room.players.some(p => p.id == gameStore.player?.id)) {
40-
passwd = await msgbox.prompt("请输入房间密码:") || "";
40+
passwd = await msgbox.prompt("请输入房间密码:").catch(() => "") || "";
4141
if (!passwd) return router.back();
4242
if (room.attrs.passwd !== md5(passwd)) {
4343
msg.error("密码错误,无法加入房间。");

0 commit comments

Comments
 (0)