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

/ui/locations/entries/pin default_icon without a location.record property #1598

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

simon-leech
Copy link
Contributor

Description

In a custom view, when calling mapp.ui.locations.infoj - the location may not have a record.
As such the pin.mjs would fail as it was looking for entry.location.record.symbol.

This PR adds a check on this to prevent it.

GitHub Issue

#1597

Type of Change

Please delete options that are not relevant, and select all options that apply.

  • ✅ Bug fix (non-breaking change which fixes an issue)

Testing Checklist

Please delete options that are not relevant, and select all options that apply.

  • ✅ Existing Tests still pass
  • ✅ Updated Existing Tests
  • ✅ New Tests Added
  • ✅ Ran locally on my machine

Code Quality Checklist

Please delete options that are not relevant, and select all options that apply.

  • ✅ My code follows the guidelines of XYZ
  • ✅ My code has been commented
  • ✅ Documentation has been updated
  • ✅ New and existing unit tests pass locally with my changes
  • ✅ Main has been merged into this PR

@simon-leech simon-leech added Bug A genuine bug. There must be some form of error exception to work with. v4.12.0 labels Oct 23, 2024
@simon-leech simon-leech marked this pull request as ready for review October 23, 2024 16:11
@dbauszus-glx dbauszus-glx changed the title In Custom View, may not have a record on the location /ui/locations/entries/pin default_icon without a location.record property Oct 24, 2024
@dbauszus-glx
Copy link
Member

The default_style didn't do anything and should be removed. The pinStyle is assigned in the location listview module method.

I have updated the docs. /docs/mapp/module-_ui_locations_entries_pin.html

I also removed that meaning less spread into spread from listview method.

Copy link
Member

@dbauszus-glx dbauszus-glx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see last comment.

Copy link

sonarcloud bot commented Oct 24, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with. v4.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/ui/locations/entries/pin default_icon without a location.record property.
2 participants