yuameshi / PhiCommunity-Bak

A community driven project to make a game like phigros.

Home Page:https://phi.han-han.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[逻辑bug]返回按钮逻辑错误

luckylaiCN opened this issue · comments

环境

System : Windows 10
Browser : Chrome
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
Last git commit : c694f0b

重现

  • 进入设置界面
  • 进入偏移率设置
  • 完成偏移率设置
  • 点击返回按钮(#backBtn)

结果

  • 返回至偏移率设置界面

期望值

  • 返回到选歌界面

可能出错的地方

/settings/index.js

document.querySelector("#backBtn").addEventListener("click", () => {
			history.length >= 3
				? history.back() // <- line 15 
				: (location.href = "../chapterSelect/index.html");
		});

#backBtn被点击时,由于history的最后一项是在偏移率设置界面,所以history.back()回到了偏移率设置。

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

fuck u

commented

已经修复