Skip to content
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

🐛 Fixed admin crashing when deleting a tier benefit that was last moved #20628

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

9larsons
Copy link
Contributor

ref https://linear.app/tryghost/issue/ENG-1433/

  • in the tiers details modal, if a tier was deleted after being moved it would crash admin

The SortableList component calls renderItem for the drag overlay on the dragged item. However, if that item was deleted, the draggingId never got reset causing the drag overlay to try to call renderItem on a nonexistent item.

As a note, we don't actually use this overlay... it could be best to strip it out to prevent causing issues.

ref https://linear.app/tryghost/issue/ENG-1433/
- in the tiers details modal, if a tier was deleted after being moved it would crash admin

The SortableList component calls renderItem for the drag overlay on the dragged item. However, if that item was deleted, the draggingId never got reset causing the drag overlay to try to call renderItem on a nonexistent item.

As a note, we don't actually use this overlay... it could be best to strip it out to prevent causing issues.
@github-actions github-actions bot added the affects:admin Anything relating to Ghost Admin label Jul 18, 2024
@9larsons 9larsons enabled auto-merge (squash) July 18, 2024 17:16
@9larsons 9larsons merged commit 6840c3a into main Jul 18, 2024
19 checks passed
@9larsons 9larsons deleted the fix-admin-tier-reorder branch July 18, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant