mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-24 23:23:57 +00:00
@@ -8,6 +8,7 @@ import {
|
||||
} from "@lib/common/utils";
|
||||
import { getConfig, type AllSettingItemKey } from "./settingConstants";
|
||||
import { LOG_LEVEL_NOTICE, Logger } from "octagonal-wheels/common/logger";
|
||||
import { isNotFoundError } from "@lib/common/utils.doc";
|
||||
|
||||
/**
|
||||
* Generates a summary of P2P configuration settings
|
||||
@@ -90,10 +91,10 @@ export function getSummaryFromPartialSettings(setting: Partial<ObsidianLiveSyncS
|
||||
export async function copyMigrationDocs(docName: string, dbFrom: PouchDB.Database, dbTo: PouchDB.Database) {
|
||||
try {
|
||||
const doc = await dbFrom.get(docName);
|
||||
delete (doc as any)._rev;
|
||||
delete (doc as { _rev?: string })._rev;
|
||||
await dbTo.put(doc);
|
||||
} catch (e) {
|
||||
if ((e as any).status === 404) {
|
||||
if (isNotFoundError(e)) {
|
||||
return;
|
||||
}
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user