1
0
Fork 0
mirror of synced 2024-08-04 21:02:01 +12:00

Fixing an issue introduced here which caused template test to fail.

This commit is contained in:
mike12345567 2024-06-06 14:58:03 +01:00
parent 0a5a788440
commit f0f8c14216

View file

@ -108,16 +108,15 @@ async function buildBaseDefinition(): Promise<PreSaveSQLiteDefinition> {
export async function syncDefinition(): Promise<void> {
const db = context.getAppDB()
let rev: string | undefined
try {
if (await db.exists(SQLITE_DESIGN_DOC_ID)) {
const existing = await db.get(SQLITE_DESIGN_DOC_ID)
rev = existing._rev
} finally {
const definition = await buildBaseDefinition()
if (rev) {
definition._rev = rev
}
await db.put(definition)
}
const definition = await buildBaseDefinition()
if (rev) {
definition._rev = rev
}
await db.put(definition)
}
export async function addTable(table: Table) {