Skip to content

Commit 8289cdd

Browse files
author
Nikos Katsikanis
committed
filter only github pages
1 parent 39f67bd commit 8289cdd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// File: js/config.js
22

33
export function getBaseUrl() {
4-
return (window.location.hostname === 'localhost' ? '' : '/vanillajs-patterns') + '/js';
4+
// Only prefix with /vanillajs-patterns when hosted on GitHub Pages
5+
if (window.location.hostname === 'quantuminformation.github.io') {
6+
return '/vanillajs-patterns/js';
7+
}
8+
return '/js';
59
}
610

711
const config = {

0 commit comments

Comments
 (0)