mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#315
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Romuromylus on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/667
Summary
After PR #666 reverted PR #661, the legacy CharacterEditor crashes (blank screen +
TypeError: can't access property "toFixed", v.zoom is undefined) when opening any character whoseextensions.avatarCropwas saved during the brief window PR #661 was live. Those crops are in the new{srcX, srcY, srcWidth, srcHeight}shape; the reverted editor reads.zoomdirectly.Expected behavior
Opening a character with a foreign-shape
avatarCropshould not crash. The cropper widget should fall back to the default (zoom 1, offset 0,0) and let the user re-edit or just save (which overwrites the foreign shape with the legacy one).Actual behavior
packages/client/src/components/characters/CharacterEditor.tsxreadscrop.zoom.toFixed(2)directly. When the saved crop lacks.zoom, the editor throws and renders a blank screen. The character cannot be opened at all.Console error:
getAvatarCropStyleinpackages/client/src/lib/utils.tshas the same shape assumption — it produces invalid CSS (scale(undefined) translate(undefined%, undefined%)) for foreign-shape crops. Doesn't crash, but silently fails to apply any transform.Steps to reproduce
{srcX, srcY, srcWidth, srcHeight}inextensions.avatarCrop.Environment
0cb2f4e`)Logs, screenshots, or video
Console error stack:
Additional context
Edge case: only affects users who saved an
avatarCropwith the new cropper during the PR #661 window. The fix is a defensive read — treat anything that isn't a legacy shape as "no crop" so the editor opens with the slider at the default and the user can re-edit cleanly.Follow-up PR with the surgical patch is on the way (linked from this issue once filed).
Template check