File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
dashi/src/lib/actions/helpers Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,23 @@ import { applyStateChangeRequests } from "@/lib/actions/helpers/applyStateChange
66
77export function invokeCallbacks ( callbackRequests : CallbackRequest [ ] ) {
88 const { configuration } = store . getState ( ) ;
9- console . debug ( "invokeCallbacks -->" , callbackRequests ) ;
9+ const invocationId = getInvocationId ( ) ;
10+ if ( import . meta. env . DEV ) {
11+ console . debug ( `invokeCallbacks (${ invocationId } )-->` , callbackRequests ) ;
12+ }
1013 if ( callbackRequests . length ) {
1114 fetchApiResult (
1215 fetchStateChangeRequests ,
1316 callbackRequests ,
1417 configuration . api ,
1518 ) . then ( ( changeRequestsResult ) => {
1619 if ( changeRequestsResult . data ) {
17- console . debug ( "invokeCallbacks <--" , changeRequestsResult . data ) ;
20+ if ( import . meta. env . DEV ) {
21+ console . debug (
22+ `invokeCallbacks <--(${ invocationId } )` ,
23+ changeRequestsResult . data ,
24+ ) ;
25+ }
1826 applyStateChangeRequests ( changeRequestsResult . data ) ;
1927 } else {
2028 console . error (
@@ -27,3 +35,9 @@ export function invokeCallbacks(callbackRequests: CallbackRequest[]) {
2735 } ) ;
2836 }
2937}
38+
39+ let invocationCounter = 0 ;
40+
41+ function getInvocationId ( ) {
42+ return invocationCounter ++ ;
43+ }
You can’t perform that action at this time.
0 commit comments