mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
chore(monorepo/client): type error in library loader
This commit is contained in:
@@ -85,7 +85,7 @@ async function requireLibrary(library: Library) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function unwrapValue<T>(value: T | (() => T) | Promise<(() => T)>) {
|
async function unwrapValue<T>(value: T | (() => T) | Promise<T>) {
|
||||||
if (value && typeof value === "object" && "then" in value) {
|
if (value && typeof value === "object" && "then" in value) {
|
||||||
return (await (value as Promise<() => T>))();
|
return (await (value as Promise<() => T>))();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user