Skip to content

Commit e58f334

Browse files
committed
Use uuid package instead of crypto.randomUUID() so it also works when testing locally
1 parent 2bb3f45 commit e58f334

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/App.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
type Catalogue,
1616
removeFailedSite,
1717
} from "@samply/lens";
18+
import { v4 as uuidv4 } from "uuid";
1819
import options from "./config/options.json";
1920
import catalogue from "./config/catalogue.json";
2021
import { env } from "$env/dynamic/public";
@@ -172,9 +173,7 @@
172173
const query = base64Encode(
173174
JSON.stringify({
174175
lang: "ast",
175-
payload: base64Encode(
176-
JSON.stringify({ ast: getAst(), id: crypto.randomUUID() }),
177-
),
176+
payload: base64Encode(JSON.stringify({ ast: getAst(), id: uuidv4() })),
178177
}),
179178
);
180179

0 commit comments

Comments
 (0)