mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2024-12-15 09:14:07 +02:00
Fixed:
- Now we can merge JSON files even if they have entries which cannot be compared.
This commit is contained in:
parent
2fdc7669f3
commit
bc568ff479
@ -2297,6 +2297,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
||||
}
|
||||
|
||||
async mergeObject(path: string, baseRev: string, currentRev: string, conflictedRev: string): Promise<string | false> {
|
||||
try {
|
||||
const baseLeaf = await this.getConflictedDoc(path, baseRev);
|
||||
const leftLeaf = await this.getConflictedDoc(path, currentRev);
|
||||
const rightLeaf = await this.getConflictedDoc(path, conflictedRev);
|
||||
@ -2314,7 +2315,6 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
||||
{ mtime: rightLeaf.mtime, patch: diffRight }
|
||||
].sort((a, b) => a.mtime - b.mtime);
|
||||
let newObj = { ...baseObj };
|
||||
try {
|
||||
for (const patch of patches) {
|
||||
newObj = applyPatch(newObj, patch.patch);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user