Skip to content

fix(sort-animation): guard against undefined elements when sorting across containers - #679

Open
Reyo77 wants to merge 1 commit into
Shopify:mainfrom
Reyo77:fix-sort-animation-crash
Open

fix(sort-animation): guard against undefined elements when sorting across containers#679
Reyo77 wants to merge 1 commit into
Shopify:mainfrom
Reyo77:fix-sort-animation-crash

Conversation

@Reyo77

@Reyo77 Reyo77 commented Aug 22, 2026

Copy link
Copy Markdown

This PR implements or fixes...

Fixes an unhandled TypeError: Cannot read property 'domEl' of undefined in SortAnimation when sorting items across multiple containers or into empty containers where indices exceed the initial container elements.

Also adds a comprehensive unit test suite in src/Plugins/SortAnimation/tests/SortAnimation.test.ts covering upward/downward animation calculations, empty container resilience, transition cleanups, and option handling.

This PR closes the following issues...

Addresses SortAnimation multi-container / empty container crashes.

Does this PR require the Docs to be updated?

No.

Does this PR require new tests?

Yes, new unit tests added in src/Plugins/SortAnimation/tests/SortAnimation.test.ts.

This branch been tested on...

  • Full test suite (16 suites, 229 tests passed)
  • TypeScript compiler (tsc -b)
  • ESLint (eslint ./src ./test --max-warnings 0)
  • Production build (yarn build)

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