Skip to content

Commit 422df76

Browse files
committed
fix: make json module browser compatible
1 parent 219bdd2 commit 422df76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ export function valueToJSON(value: unknown): KvValueJSON {
611611
if (value instanceof Date) {
612612
return { type: "Date", value: value.toJSON() };
613613
}
614-
if (value instanceof Deno.KvU64) {
614+
if ("Deno" in globalThis && value instanceof Deno.KvU64) {
615615
return { type: "KvU64", value: String(value) };
616616
}
617617
if (value instanceof Error) {

0 commit comments

Comments
 (0)