Skip to content

Commit f565849

Browse files
committed
fix: stop coercing AnimatedString to AnimatedValue in "SpringValue#_getNodeType"
Fixes #867 Not sure why that condition existed in the first place...
1 parent 3e0f091 commit f565849

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/core/src/SpringValue.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,9 @@ export class SpringValue<T = any> extends FrameValue<T> {
482482
/** Return the `Animated` node constructor for a given value */
483483
protected _getNodeType(value: T | FluidValue<T>): AnimatedType {
484484
const parentNode = getAnimated(value)
485-
if (parentNode) {
486-
const parentType = parentNode.constructor as any
487-
return parentType == AnimatedString ? AnimatedValue : parentType
488-
}
489-
return is.arr(value)
485+
return parentNode
486+
? (parentNode.constructor as any)
487+
: is.arr(value)
490488
? AnimatedArray
491489
: isAnimatedString(value)
492490
? AnimatedString

0 commit comments

Comments
 (0)