vjekob / al-objid

Manage object IDs in multi-user environments with mind-boggling simplicity.
MIT License
29 stars 18 forks source link

Show multiple entries even if there's no description given #69

Open DavidFeldhoff opened 6 months ago

DavidFeldhoff commented 6 months ago

Hey Vjeko,

currently in the AL Object ID Ninja is not able to show the id ranges if there's no description given and if there is more than one range specified per object type. The issue is the results.find(..) which finds the first undefined result, but as if(undefined) equals false, we're having afterwards two undefined entries in the results array and afterwards it fails as it tries to add the LogicalObjectTypeRangesNode with the name=undefined twice and then shows no id range at all. See here: image

I propose a solution where grouping is only done, if you gave the ranges a description. If there's no description given, then the ranges without names are simply appended. See here how it looks with my fix. image

Just FYI what I tried as well: Avoiding to have the undefined entry in the results array twice, but then we have afterwards a group "_" under the object types, which simply doesn't look nice, like.

Object Ranges
- pageextension
  - _
    - 9..10
    - 11..12