id attribute is not set if it is 0
See original GitHub issuetest with turf.lineString(<coords>,{},{id:0})
on v.5.1.6
if id is 0
the id field is missing
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What are valid values for the id attribute in HTML?
For HTML 4, the answer is technically: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any...
Read more >id - HTML: HyperText Markup Language - MDN Web Docs
The id global attribute defines an identifier (ID) which must be unique in the whole document. Its purpose is to identify the element...
Read more >HTML - The id attribute - W3Schools
The HTML id attribute is used to specify a unique id for an HTML element. You cannot have more than one element with...
Read more >Lesson 1: Understanding ID and Class in CSS
In HTML, every element on your web page can be assigned a unique id attribute. This can be any text you like, but...
Read more >6 Basic HTML data types
If an attribute value is a list, the keys apply to every value in the list, ... IDREF and IDREFS are references to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I investigated this issue, and it’s solved in 6.2.0-alpha.1.
To test, I added an id of 0 to the linestring used in the unit tests. Here’s the created feature object with the id attached:
If this needs more work, I can be involved 😃
Sounds like this is fixed in 6.2.0 and above.