Skip to content

Commit 540acf6

Browse files
committed
fix: hopefully last one to fix the url things
1 parent f871b43 commit 540acf6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/routes/+page.svelte

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
try {
3030
const basePath = window.location.origin.includes('github') ? '/nes-cart-browser' : '';
3131
const response = await fetch(`${basePath}/nesCarts.json`);
32-
nesCarts = await response.json();
32+
const _carts = await response.json() as NesCartItem[];
33+
nesCarts = _carts.map((cart) => ({
34+
...cart,
35+
coverPhotoUrl: `${basePath}${cart.coverPhotoUrl}`
36+
}));
3337
} catch (error) {
3438
console.error('Error fetching nesCarts:', error);
3539
} finally {

0 commit comments

Comments
 (0)