Skip to content

fix: guard against undefined options in source filtering#11533

Merged
tyrasd merged 1 commit into
openstreetmap:developfrom
hlfan:source-filter-fix
Oct 31, 2025
Merged

fix: guard against undefined options in source filtering#11533
tyrasd merged 1 commit into
openstreetmap:developfrom
hlfan:source-filter-fix

Conversation

@hlfan

@hlfan hlfan commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Adds another guard to prevent #11532.

@k-yle k-yle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this does fix the bug, but the proper solution would be to revert this manual change to the generated dist file.

source has "stringsCrossReference": "{source}" , which is circular reference, hence why field.options is undefined.

Since that edit is not in the main branch, there's probably no point in sending a PR. We'll need @tyrasd to update that file and make a new release

@hlfan hlfan closed this Oct 31, 2025
@hlfan hlfan deleted the source-filter-fix branch October 31, 2025 07:17
@tyrasd

tyrasd commented Oct 31, 2025

Copy link
Copy Markdown
Member

yeah, I had messed something up when creating the v6.13.3 dist release: I had an uncommitted test version of the source.json field in my directory which I though I had deleted, but wasn't. Sorry for that.

@hlfan I think there is still merit in merging this safeguard check. It could even come into play when people are running their own instance iD if nonstandard presets. Can you restore your branch, please?

@hlfan hlfan restored the source-filter-fix branch October 31, 2025 18:05
@hlfan hlfan reopened this Oct 31, 2025
@hlfan

hlfan commented Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

Nice to see the tests pass too now @tyrasd.

@tyrasd tyrasd merged commit 96f2f86 into openstreetmap:develop Oct 31, 2025
4 of 6 checks passed
@hlfan hlfan deleted the source-filter-fix branch October 31, 2025 21:57
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.

3 participants