Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: check browser env before accessing navigator

JovannMC4d52e06c9bc6
diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts
index 20fddd8..86536d0 100644
--- a/src/lib/store/index.svelte.ts
+++ b/src/lib/store/index.svelte.ts
@@ -1,3 +1,4 @@
+import { browser } from "$app/environment";
import { converters } from "$lib/converters";
import { error, log } from "$lib/logger";
import { VertFile } from "$lib/types";
@@ -24,7 +25,7 @@ class Files {
);
private thumbnailQueue = new PQueue({
- concurrency: navigator.hardwareConcurrency || 4,
+ concurrency: browser ? navigator.hardwareConcurrency || 4 : 4,
});
private _addThumbnail = async (file: VertFile) => {