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

Set iD map param with array #5632

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Conversation

hlfan
Copy link
Contributor

@hlfan hlfan commented Feb 8, 2025

Splitting parameter population and assignment, enabling a singular later default zoom value definition.
A new take on what was dropped in #5597.

@AntonKhorev
Copy link
Collaborator

A stylistic change without clear improvements, not even shorter. Adds:

  • uninitialized variable
  • null value
  • magic array index number

@hlfan hlfan force-pushed the id-init-dev branch 2 times, most recently from f1b0cbb to f359a73 Compare February 10, 2025 15:43
Copy link
Member

@tomhughes tomhughes left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all the review comment - this looks good to me now.

The only thing that slightly confuses me is the need for parentheses around the destructuring on lines 20 and 22 as it seems to work without that when I try it in the node console but eslint does fail to parse it unless you include them!

@tomhughes tomhughes merged commit 46f642d into openstreetmap:master Feb 12, 2025
14 of 15 checks passed
@hlfan
Copy link
Contributor Author

hlfan commented Feb 12, 2025

MDN says:

The parentheses around the assignment statement are required when using object literal destructuring assignment without a declaration.

As for why it works in the console?
¯\_(ツ)_/¯

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.

4 participants