mirror of https://github.com/VERT-sh/VERT.git
fix: check browser env before accessing navigator
This commit is contained in:
parent
2c8cb1922c
commit
4d52e06c9b
|
@ -1,3 +1,4 @@
|
||||||
|
import { browser } from "$app/environment";
|
||||||
import { converters } from "$lib/converters";
|
import { converters } from "$lib/converters";
|
||||||
import { error, log } from "$lib/logger";
|
import { error, log } from "$lib/logger";
|
||||||
import { VertFile } from "$lib/types";
|
import { VertFile } from "$lib/types";
|
||||||
|
@ -24,7 +25,7 @@ class Files {
|
||||||
);
|
);
|
||||||
|
|
||||||
private thumbnailQueue = new PQueue({
|
private thumbnailQueue = new PQueue({
|
||||||
concurrency: navigator.hardwareConcurrency || 4,
|
concurrency: browser ? navigator.hardwareConcurrency || 4 : 4,
|
||||||
});
|
});
|
||||||
|
|
||||||
private _addThumbnail = async (file: VertFile) => {
|
private _addThumbnail = async (file: VertFile) => {
|
||||||
|
|
Loading…
Reference in New Issue