fix: restore TypeScript build

This commit is contained in:
lucaronin
2026-05-14 16:09:54 +02:00
parent 8b1d2bbed8
commit 416131aa8f
2 changed files with 4 additions and 3 deletions

View File

@@ -429,7 +429,7 @@ interface PersistNewNoteRequest {
vaultPath?: string
}
function createNoteContentArgs({ path, content, vaultPath }: PersistNewNoteRequest): PersistNewNoteRequest {
function createNoteContentArgs({ path, content, vaultPath }: PersistNewNoteRequest): Record<string, unknown> {
return vaultPath ? { path, content, vaultPath } : { path, content }
}

View File

@@ -51,7 +51,8 @@ function findExternallyMovedActiveEntry(options: {
&& updatedPaths.has(normalizeNotePathForIdentity(entry.path)),
)
return candidates.length === 1 ? candidates[0] : null
const [candidate] = candidates
return candidates.length === 1 && candidate ? candidate : null
}
function isActivePathBlocked(options: {
@@ -117,7 +118,7 @@ export async function refreshPulledVaultState(options: PulledVaultRefreshOptions
if (isActivePathBlocked({ activeTabPath, latestActiveTabPath, hasUnsavedChanges })) return entries
const activePath = latestActiveTabPath as string
const refreshedEntry = findByNotePath(entries, activePath)
const refreshedEntry = findByNotePath(entries, activePath) ?? null
const movedEntry = refreshedEntry ? null : findExternallyMovedActiveEntry({
activeTabPath: activePath,
entries,