File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -241,16 +241,18 @@ export class Controller<State extends Indexable = UnknownProps> {
241241/** Determine which keys should receive an update */
242242function extractKeys ( props : ControllerProps , springs : Indexable < SpringValue > ) {
243243 const keys = new Set < AnyKey > ( )
244- const extract = ( obj : Indexable ) =>
244+
245+ /** Collect keys with a defined value */
246+ const extractDefined = ( obj : Indexable ) =>
245247 each ( obj , ( value , key ) => {
246248 if ( ! is . und ( value ) ) {
247249 keys . add ( key )
248250 }
249251 } )
250252
251253 const { from, to } = props
252- if ( is . obj ( to ) ) extract ( to )
253- if ( from ) extract ( from )
254+ if ( is . obj ( to ) ) extractDefined ( to )
255+ if ( from ) extractDefined ( from )
254256
255257 // When neither "from" or "to" have a key with a defined value,
256258 // return the keys for every existing spring.
You can’t perform that action at this time.
0 commit comments