Skip to content

Commit e6dda18

Browse files
committed
bugfix in latest svelte+vite, import.meta.url is different in ssr pages
1 parent 069a7ed commit e6dda18

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/helpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { Address, Slice, Cell } from "ton-core";
22
import examples from "../routes/(examples)/examples.json";
3-
import path from "path";
43

54
export function getExample(page: string) {
6-
const id = path.basename(path.dirname(page));
75
let i;
86
for (i = 0; i < examples.length; i++) {
9-
if (examples[i].id == id) break;
7+
if (page.includes(examples[i].id)) break;
108
}
119
return {
1210
self: examples[i],

0 commit comments

Comments
 (0)