File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ import {
104104 collForEach ,
105105 collHas ,
106106 collIsEmpty ,
107+ collSize2 ,
107108 collSize3 ,
108109 collSize4 ,
109110} from './common/coll' ;
@@ -1198,12 +1199,12 @@ export const createStore: typeof createStoreDecl = (): Store => {
11981199 } ;
11991200
12001201 const startTransaction = ( ) : Store => {
1201- if ( transactions == 0 ) {
1202- callListeners ( startTransactionListeners , undefined , false , false ) ;
1203- }
12041202 if ( transactions != - 1 ) {
12051203 transactions ++ ;
12061204 }
1205+ if ( transactions == 1 ) {
1206+ callListeners ( startTransactionListeners , undefined , false , false ) ;
1207+ }
12071208 return store ;
12081209 } ;
12091210
@@ -1413,7 +1414,9 @@ export const createStore: typeof createStoreDecl = (): Store => {
14131414 valueIds : pairCollSize2 ( valueIdsListeners ) ,
14141415 value : pairCollSize2 ( valueListeners ) ,
14151416 invalidValue : pairCollSize2 ( invalidValueListeners ) ,
1416- transaction : pairCollSize2 ( finishTransactionListeners ) ,
1417+ transaction :
1418+ collSize2 ( startTransactionListeners ) +
1419+ pairCollSize2 ( finishTransactionListeners ) ,
14171420 }
14181421 : { } ;
14191422
You can’t perform that action at this time.
0 commit comments