@@ -72,7 +72,8 @@ export function getCallbackRequests(
7272 ) ;
7373}
7474
75- // This is a dummy function created to memoize the _inputValues values
75+ // This is a dummy function created to memoize the _inputValues values from
76+ // getCallbackRequest()
7677const _getInputValues = ( _inputValues : unknown [ ] ) : unknown [ ] => {
7778 return _inputValues ;
7879} ;
@@ -99,9 +100,9 @@ const getCallbackRequest = (
99100
100101 const inputValues = memoizedInputValues ( _inputValues ) ;
101102
102- const propRefId = `${ contribPoint } -${ contribIndex } -${ callbackIndex } -${ inputIndex } ` ;
103+ const callbackId = `${ contribPoint } -${ contribIndex } -${ callbackIndex } -${ inputIndex } ` ;
103104 if ( lastCallbackInputValues ) {
104- const lastInputValues = lastCallbackInputValues [ propRefId ] ;
105+ const lastInputValues = lastCallbackInputValues [ callbackId ] ;
105106 if ( lastInputValues && shallowEqualArrays ( lastInputValues , inputValues ) ) {
106107 // We no longer log, as the situation is quite common
107108 // Enable error logging for debugging only:
@@ -110,12 +111,12 @@ const getCallbackRequest = (
110111 // console.groupEnd();
111112 return undefined ;
112113 }
113- lastCallbackInputValues [ propRefId ] = inputValues ;
114+ lastCallbackInputValues [ callbackId ] = inputValues ;
114115 store . setState ( {
115116 lastCallbackInputValues : { ...lastCallbackInputValues } ,
116117 } ) ;
117118 } else {
118- store . setState ( { lastCallbackInputValues : { [ propRefId ] : inputValues } } ) ;
119+ store . setState ( { lastCallbackInputValues : { [ callbackId ] : inputValues } } ) ;
119120 }
120121 return { ...propertyRef , inputValues } ;
121122} ;
0 commit comments