chore: use push instead of spreading array

This commit is contained in:
Marc-Roig 2023-05-22 17:08:43 +02:00
parent 7c0ab2cc38
commit 51683b479c
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -53,14 +53,14 @@ const transactionCtx = {
onCommit(cb) { onCommit(cb) {
const store = storage.getStore(); const store = storage.getStore();
if (store?.commitCallbacks) { if (store?.commitCallbacks) {
store.commitCallbacks = [...store.commitCallbacks, cb]; store.commitCallbacks.push(cb);
} }
}, },
onRollback(cb) { onRollback(cb) {
const store = storage.getStore(); const store = storage.getStore();
if (store?.rollbackCallbacks) { if (store?.rollbackCallbacks) {
store.rollbackCallbacks = [...store.rollbackCallbacks, cb]; store.rollbackCallbacks.push(cb);
} }
}, },
}; };