Coverage of types files can end up with a fatal error: Cannot read properties of undefined (reading 'endCol')
#5639
Labels
feat: coverage
Issues and PRs related to the coverage feature
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
I apologise for not submitting a minimal reproduction, but thought you'd appreciate notice of this issue while I work on creating the minimal repro.
Debugging, this reveals in this code:
When the error occurs,
start
is 0,end
is 1, and thereforemid
initialises at 0. This meansend
gets set to-1
andlines[end]
therefore ends up undefined.When I log the file being processed, it seems to be one of the files which export pure types. (But note I have not been able to reproduce this naively, so 🤷.)
Reproduction
nuxt/nuxt#26922
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: