Skip to content

Commit 525dfea

Browse files
committed
nit: stop setting "_timestamps" lazily
1 parent f7b7d49 commit 525dfea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/core/src/SpringValue.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class SpringValue<T = any> extends AnimationValue<T> {
9292
/** The state for `runAsync` calls */
9393
protected _state: RunAsyncState<T>
9494
/** The last time each prop changed */
95-
protected _timestamps?: Indexable<number>
95+
protected _timestamps: Indexable<number> = {}
9696
/** Some props have customizable default values */
9797
protected _defaultProps = {} as PendingProps<T>
9898
/** Cancel any update from before this timestamp */
@@ -389,8 +389,7 @@ export class SpringValue<T = any> extends AnimationValue<T> {
389389
// Cast from a partial type.
390390
const anim: Partial<Animation<T>> = this.animation
391391

392-
/** Where per-prop timestamps are kept */
393-
const timestamps = this._timestamps || (this._timestamps = {})
392+
const timestamps = this._timestamps
394393

395394
/** Return true if our prop can be used. This only affects delayed props. */
396395
const diff = (prop: string) => {

0 commit comments

Comments
 (0)