UmbrellaDocs / linkspector

Uncover broken links in your content.
Apache License 2.0
64 stars 10 forks source link

[BUG] Cannot read properties of undefined (reading 'start') #77

Open Rolv-Apneseth opened 3 months ago

Rolv-Apneseth commented 3 months ago

Describe the bug First, thank you for making this.

As for the issue, while running linkspector check on a json file, I am getting the following error:

💥 Error: Cannot read properties of undefined (reading 'start')

To Reproduce Running linkspector check with the following minimal json file causes it for me:

{
    "images": [
        "https://cdn.britannica.com/75/178475-050-E9212E3D/Pyramid-of-Khufu-Giza-Egypt.jpg"
    ]
}

The issue does not happen when I remove the array and just have "images": "..." directly.

Expected behavior I would expect this to work, but a better error message to give a better idea of what the actual issue is, or at least a line number pointing to the offending link, would be nice too.