Skip to content

fix: avoid toSorted in keyframe normalization for older Chromium - #193

Merged
dazzatronus merged 4 commits into
mainfrom
fix/keyframe-tosorted-compat
Sep 24, 2026
Merged

dazzatronus merged 4 commits into
mainfrom
fix/keyframe-tosorted-compat

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Keyframed templates fail to load in browsers without Array.prototype.toSorted; adding opacity keyframes also fails.

Sort the freshly created arrays with the existing comparators. Caller-owned arrays remain unchanged.

Verify: npm run verify:ci passes on Node 22, including 2,084 tests, lint, typecheck, builds and package contract checks.

toSorted is Chrome 110+ only; older mobile Chromium throws during
edit.load. Use slice().sort with the same comparators so keyframe and
opacity paths keep working on older browsers.
Remove delete/restore of Array.prototype.toSorted in unit tests
(eslint no-extend-native). Prove slice().sort via unsorted public API
inputs instead.
@dazzatronus
dazzatronus force-pushed the fix/keyframe-tosorted-compat branch from 47d7495 to 15ddb9e Compare September 24, 2026 06:03
@dazzatronus dazzatronus self-assigned this Sep 24, 2026
@dazzatronus
dazzatronus merged commit 5296133 into main Sep 24, 2026
1 check passed
@dazzatronus
dazzatronus deleted the fix/keyframe-tosorted-compat branch September 24, 2026 23:56
github-actions Bot pushed a commit that referenced this pull request Sep 25, 2026
## [2.22.2](v2.22.1...v2.22.2) (2026-09-24)

### Bug Fixes

* avoid toSorted in keyframe normalization for older Chromium ([#193](#193)) ([5296133](5296133))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.22.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant