@classytic/mongokit 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1073,7 +1073,7 @@ var Repository = class {
|
|
|
1073
1073
|
if (typeof options.onFallback === "function") {
|
|
1074
1074
|
options.onFallback(err);
|
|
1075
1075
|
}
|
|
1076
|
-
if (started
|
|
1076
|
+
if (started) {
|
|
1077
1077
|
try {
|
|
1078
1078
|
await session.abortTransaction();
|
|
1079
1079
|
} catch {
|
|
@@ -1081,8 +1081,11 @@ var Repository = class {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
return await callback(null);
|
|
1083
1083
|
}
|
|
1084
|
-
if (started
|
|
1085
|
-
|
|
1084
|
+
if (started) {
|
|
1085
|
+
try {
|
|
1086
|
+
await session.abortTransaction();
|
|
1087
|
+
} catch {
|
|
1088
|
+
}
|
|
1086
1089
|
}
|
|
1087
1090
|
throw err;
|
|
1088
1091
|
} finally {
|
package/package.json
CHANGED