Regression that prevented initial configuration
This commit is contained in:
parent
95cfa8c8d7
commit
9588ca7749
|
@ -25,7 +25,7 @@ export const put = async (
|
||||||
let to;
|
let to;
|
||||||
try {
|
try {
|
||||||
const parent = await db.get(parentId);
|
const parent = await db.get(parentId);
|
||||||
// console.log({ caller: 'put', parent });
|
// console.log({ caller: 'put', parent });
|
||||||
to = parent.to;
|
to = parent.to;
|
||||||
} catch {}
|
} catch {}
|
||||||
current = { _rev: undefined, to, doc: cloneDeep(defaultDoc) };
|
current = { _rev: undefined, to, doc: cloneDeep(defaultDoc) };
|
||||||
|
@ -36,7 +36,9 @@ export const put = async (
|
||||||
_rev: current._rev,
|
_rev: current._rev,
|
||||||
type,
|
type,
|
||||||
to: current.to,
|
to: current.to,
|
||||||
origin: current.origin ?? dbUrlToUserId(state().remoteUrl),
|
origin:
|
||||||
|
current.origin ??
|
||||||
|
(state().remoteUrl ? dbUrlToUserId(state().remoteUrl) : undefined),
|
||||||
doc: update(current.doc),
|
doc: update(current.doc),
|
||||||
};
|
};
|
||||||
await targetDb.put(putDoc);
|
await targetDb.put(putDoc);
|
||||||
|
|
Loading…
Reference in New Issue