We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 850410c commit b534305Copy full SHA for b534305
src/common/profile/import.ts
@@ -382,11 +382,11 @@ export const importUserExperienceFromJSON = async ({
382
)
383
.parse(dataJson);
384
385
- const transactionFn = transaction
386
- ? con.transaction
387
- : async <T>(callback: (entityManager: EntityManager) => Promise<T>) => {
388
- return callback(con);
389
- };
+ const transactionFn = async <T>(
+ callback: (entityManager: EntityManager) => Promise<T>,
+ ) => {
+ return transaction ? con.transaction(callback) : callback(con);
+ };
390
391
await transactionFn(async (entityManager) => {
392
for (const item of data) {
0 commit comments