question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

id attribute is not set if it is 0

See original GitHub issue

test with turf.lineString(<coords>,{},{id:0}) on v.5.1.6

if id is 0 the id field is missing

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
djbusstopcommented, Apr 12, 2020

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:

{
  type: 'Feature',
  id: 0,
  properties: { name: 'test line' },
  geometry: { type: 'LineString', coordinates: [ [Array], [Array] ] }
}

If this needs more work, I can be involved 😃

0reactions
mfedderlycommented, Aug 2, 2021

Sounds like this is fixed in 6.2.0 and above.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found