Repository navigation
fix(vue): keep frame interpolation enabled when the prop is omitted - #1010
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: c7b95d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
theashraf
reviewed
Nov 20, 2026
| expect(component?.getDotLottieInstance()?.isLoaded).toBe(true); | ||
| }); | ||
|
|
||
| expect(component?.getDotLottieInstance()?.useFrameInterpolation).toBe(true); |
Member
There was a problem hiding this comment.
Thanks for the fix! This line is what's breaking Type Check. component is only assigned inside closures, so TS thinks it's still null here.
Can you move mount() (plus app and the afterEach) out of the themeData block to file scope and reuse it? Then this is just instance().useFrameInterpolation.
| useFrameInterpolation: { | ||
| type: Boolean as PropType<DotLottieVueProps['useFrameInterpolation']>, | ||
| required: false, | ||
| default: undefined, |
Member
There was a problem hiding this comment.
Tried it locally, works. Can you also update packages/vue/README.md line 78? The default column still says false.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #873 (the same default mismatch, in the Vue wrapper).
Description
DotLottieVuedeclaresuseFrameInterpolationas{ type: Boolean }. Vue casts an absent Boolean prop tofalse, so the wrapper always passeduseFrameInterpolation: falseto the player, whereas the core default (config.useFrameInterpolation ?? true) istrue. Users who never set the prop silently got frame interpolation turned off.Fix: declare the prop with
default: undefinedso an omitted prop staysundefinedand the core default applies. Explicittrue/falsebehave as before.Tests: adds a Vue wrapper test that mounts the component without the prop and asserts the player's
useFrameInterpolationistrue. It fails onmain(expected false to be true) and passes with the change.Reproduction
Mount
<DotLottieVue :src="url" />withoutuseFrameInterpolationand readgetDotLottieInstance().useFrameInterpolation:falseon main,trueafter the fix. Command:cd packages/vue && vitest run --browser.headless.Package(s) affected
@lottiefiles/dotlottie-web(core)@lottiefiles/dotlottie-react@lottiefiles/dotlottie-vue@lottiefiles/dotlottie-svelte@lottiefiles/dotlottie-solid@lottiefiles/dotlottie-wcType of change
Checklist
AI assistance was used to prepare this change.