mirror of
https://github.com/strapi/strapi.git
synced 2025-11-30 17:18:24 +00:00
chore: use push instead of spreading array
This commit is contained in:
parent
7c0ab2cc38
commit
51683b479c
@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user