a tool for shared writing and social publishing

don't use subtransaction for fact insertions

+6 -7
+6 -7
src/replicache/cachedServerMutationContext.ts
··· 193 193 } 194 194 } 195 195 196 - await tx.transaction((tx2) => 197 - tx2 196 + try { 197 + await tx 198 198 .insert(facts) 199 199 .values({ 200 200 id: f.id, ··· 205 205 .onConflictDoUpdate({ 206 206 target: facts.id, 207 207 set: { data: driz.sql`excluded.data` }, 208 - }) 209 - .catch((e) => 210 - console.log(`error on inserting fact: `, JSON.stringify(e)), 211 - ), 212 - ); 208 + }); 209 + } catch (e) { 210 + console.log(`error on inserting fact: `, JSON.stringify(e)); 211 + } 213 212 } 214 213 } 215 214 if (deleteEntitiesCache.length > 0)