Skip to content

docs(animation): add MAX_SAFE_INTEGER warning for large input edge case #3231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

70928manson
Copy link

What this PR does

This PR adds a short comment to the JavaScript example in the animation guide, warning users about potential issues with large input values exceeding Number.MAX_SAFE_INTEGER.

Why

The current example uses tweening to animate a number input. However, if the input exceeds 2^53 - 1 (9007199254740991), JavaScript may no longer represent it precisely due to floating-point limitations. This note aims to clarify that it's an edge case and not an issue with the example itself.

Changes

  • Add comment above watch block in the gsap example warning about Number.MAX_SAFE_INTEGER

Additional Notes

  • Other language versions (e.g., zh-CN, zh-HK, ja) should also consider adding this comment for consistency. The change is currently only made in the English guide.

Copy link

netlify bot commented May 1, 2025

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit be5a7d1
🔍 Latest deploy log https://app.netlify.com/sites/vuejs/deploys/681363008d62c40008af6751
😎 Deploy Preview https://deploy-preview-3231--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant