fix(grid-display): restore Maidenhead grid square in DE/DX panels#975
Merged
Merged
Conversation
…re lat/lon d1ab3d5 replaced calculateGridSquare(lat, lon) with latLonToMaidenhead but kept the two-positional-arg call style. latLonToMaidenhead expects ({lat, lon}) as its first argument; passing a bare number caused lat/lon to destructure as undefined, producing NaN and invisible characters in both DE and DX grid squares. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Looks good to me. I don't see any other instances. |
Contributor
|
added #982 for meridian / anti-meridian unit tests, and fix for special case longitude = +180 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
calculateGridSquare(lat, lon)withlatLonToMaidenheadbut kept the old two-positional-argument call style —latLonToMaidenheadexpects a{ lat, lon }object as its first argumentundefinedfor bothlatandlon, producingNaNthroughout the calculation and invisible characters in the rendered gridChange
src/hooks/app/useTimeState.jslines 101-102:Before (broken):
latLonToMaidenhead(configLocation.lat, configLocation.lon)After (correct):
latLonToMaidenhead(configLocation)Both
configLocationanddxLocationare already{ lat, lon }objects, so they can be passed directly.Test plan
GH52lj)JJ00aa— not blank🤖 Generated with Claude Code