Skip to content

Commit daab827

Browse files
committed
Fixing local url navigation
1 parent 4fcb9ca commit daab827

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<script type="text/javascript">
88
// Github pages deployment workaround https://github.com/rafgraph/spa-github-pages
9+
// Only run on GitHub Pages (not localhost)
910
;(function (l) {
10-
if (l.search[1] === '/') {
11+
if (
12+
l.hostname !== 'localhost' &&
13+
l.hostname !== '127.0.0.1' &&
14+
l.search[1] === '/'
15+
) {
1116
var decoded = l.search
1217
.slice(1)
1318
.split('&')
@@ -39,7 +44,7 @@
3944
<link rel="icon" type="image/svg+xml" href="static/favicon.svg" />
4045
<link rel="icon" type="image/png" href="static/favicon.png" />
4146
<link rel="manifest" href="static/site.webmanifest" />
42-
<script type="module" src="Eplant/main.tsx"></script>
47+
<script type="module" src="/Eplant/main.tsx"></script>
4348
<title>Eplant</title>
4449
</head>
4550
<body>

0 commit comments

Comments
 (0)