Skip to content

Commit a6c5666

Browse files
committed
fix: url.startswith 가 /Python/ 과 /python/ 이 다르게 인식되는 문제 수정 (TypePage 여부 판단 시)
1 parent 5b6150d commit a6c5666

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/MyPage/UserContainer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ const ButtonContainer = styled.div`
8585
// URL 을 parsing 해서 현재 typepage 인지 아닌지 판단
8686
// 원시적인 방법이라 추후 다른 방법 대체 필요
8787
function isTypePage(url) {
88-
if (url.startsWith("/python/") && url.length >= 9) {
88+
if ((url.startsWith("/python/") || url.startsWith("/Python/")) && url.length >= 9) {
8989
return true;
9090
}
91-
if (url.startsWith("/html/") && url.length >= 7) {
91+
if ((url.startsWith("/html/") || url.startsWith("/Html/")) && url.length >= 7) {
9292
return true;
9393
}
94-
if (url.startsWith("/c/") && url.length >= 4) {
94+
if ((url.startsWith("/c/") || url.startsWith("/C/")) && url.length >= 4) {
9595
return true;
9696
}
9797
return false;

0 commit comments

Comments
 (0)