corebasic 1.0.184 → 1.0.185
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/libs/elabase.js +2 -2
- package/package.json +1 -1
package/libs/elabase.js
CHANGED
|
@@ -125,13 +125,13 @@ export function batchAbort(batch) { // Mandatory to prevent meory leak due to d
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
export const batch = async (callback) => { // Convenience function with auto lifecyle management and auto submit when callback returns. abort is called appropriately.
|
|
128
|
-
const batch =
|
|
128
|
+
const batch = batchBegin()
|
|
129
129
|
|
|
130
130
|
try {
|
|
131
131
|
await callback(batch)
|
|
132
132
|
return await batchSubmit(batch)
|
|
133
133
|
} catch (err) {
|
|
134
|
-
|
|
134
|
+
batchAbort(batch)
|
|
135
135
|
throw err
|
|
136
136
|
}
|
|
137
137
|
}
|