Skip to content

Commit a2e78e0

Browse files
committed
[hygiene] Fewer transaction flags
1 parent 4df4fb7 commit a2e78e0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/store.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,6 @@ export const createStore: typeof createStoreDecl = (): Store => {
12231223
if (valuesTouched) {
12241224
callKeyedValuesListenersForChanges(1);
12251225
}
1226-
transactions = -1;
12271226

12281227
if (
12291228
doRollback?.(
@@ -1253,7 +1252,6 @@ export const createStore: typeof createStoreDecl = (): Store => {
12531252
mapToObj(invalidValues),
12541253
)
12551254
) {
1256-
transactions = 1;
12571255
collForEach(changedCells, (table, tableId) =>
12581256
collForEach(table, (row, rowId) =>
12591257
collForEach(row, ([oldCell], cellId) =>
@@ -1264,9 +1262,9 @@ export const createStore: typeof createStoreDecl = (): Store => {
12641262
collForEach(changedValues, ([oldValue], valueId) =>
12651263
setOrDelValue(store, valueId, oldValue),
12661264
);
1267-
transactions = -1;
12681265
cellsTouched = valuesTouched = false;
12691266
}
1267+
transactions = -1;
12701268

12711269
callListeners(
12721270
finishTransactionListeners[0],

0 commit comments

Comments
 (0)