mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +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) {
|
||||
const store = storage.getStore();
|
||||
if (store?.commitCallbacks) {
|
||||
store.commitCallbacks = [...store.commitCallbacks, cb];
|
||||
store.commitCallbacks.push(cb);
|
||||
}
|
||||
},
|
||||
|
||||
onRollback(cb) {
|
||||
const store = storage.getStore();
|
||||
if (store?.rollbackCallbacks) {
|
||||
store.rollbackCallbacks = [...store.rollbackCallbacks, cb];
|
||||
store.rollbackCallbacks.push(cb);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user