Skip to content

fix(vue): keep frame interpolation enabled when the prop is omitted - #1010

Open
pcbeingused333 wants to merge 1 commit into
LottieFiles:mainfrom
pcbeingused333:fix/vue-frame-interpolation-default
Open

pcbeingused333 wants to merge 1 commit into
LottieFiles:mainfrom
pcbeingused333:fix/vue-frame-interpolation-default

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Follow-up to #873 (the same default mismatch, in the Vue wrapper).

Description

DotLottieVue declares useFrameInterpolation as { type: Boolean }. Vue casts an absent Boolean prop to false, so the wrapper always passed useFrameInterpolation: false to the player, whereas the core default (config.useFrameInterpolation ?? true) is true. Users who never set the prop silently got frame interpolation turned off.

Fix: declare the prop with default: undefined so an omitted prop stays undefined and the core default applies. Explicit true/false behave as before.

Tests: adds a Vue wrapper test that mounts the component without the prop and asserts the player's useFrameInterpolation is true. It fails on main (expected false to be true) and passes with the change.

Reproduction

Mount <DotLottieVue :src="url" /> without useFrameInterpolation and read getDotLottieInstance().useFrameInterpolation: false on main, true after 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-wc

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Chore (build, CI, docs, refactor)

Checklist

  • Changes have been tested locally
  • Tests have been added or updated
  • Changeset has been added (if applicable)

AI assistance was used to prepare this change.

@pcbeingused333
pcbeingused333 requested review from a team and theashraf as code owners November 19, 2026 18:42
@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c7b95d5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lottiefiles/dotlottie-vue Patch

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

expect(component?.getDotLottieInstance()?.isLoaded).toBe(true);
});

expect(component?.getDotLottieInstance()?.useFrameInterpolation).toBe(true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants