Skip to content

Commit dd4f67a

Browse files
committed
nit: rename local function
1 parent e7678cd commit dd4f67a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/core/src/Controller.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,18 @@ export class Controller<State extends Indexable = UnknownProps> {
241241
/** Determine which keys should receive an update */
242242
function 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.

0 commit comments

Comments
 (0)