You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I'm using the plugin in this repo and as you can see here the tests are failing, because the plugin throws the error TypeError: Cannot read properties of undefined (reading 'length').
You can also try by cloning the repo, checking out into tests branch, cd .\packages\starlight-spell-checker\tests\fixtures\quotes-throw-error-invalid-content\, pnpm i and running pnpm astro build. (I know this is a VERY BAD example for a repro, but I have no clue why it's just happening in this specific case...
Actual behavior
Plugin fails when smart has only 2 entries with TypeError: Cannot read properties of undefined (reading 'length')
Expected behavior
Plugin should return vfile correctly.
The issue gets fixed, when I add a safety mechanism:
I'm very sorry @wooorm to be this fricking annoying, but I'm totally lost why it works perfectly in all tests and in the repro but doesn't in my case... 🙏
Initial checklist
Affected package
[email protected]
Steps to reproduce
Okay, this is very weird, when I try to repro, it works totally fine as you can see here:
https://stackblitz.com/edit/node-zqgpemoq?file=index.js
But I'm using the plugin in this repo and as you can see here the tests are failing, because the plugin throws the error
TypeError: Cannot read properties of undefined (reading 'length')
.You can also try by cloning the repo, checking out into
tests
branch,cd .\packages\starlight-spell-checker\tests\fixtures\quotes-throw-error-invalid-content\
,pnpm i
and runningpnpm astro build
. (I know this is a VERY BAD example for a repro, but I have no clue why it's just happening in this specific case...Actual behavior
Plugin fails when smart has only 2 entries with
TypeError: Cannot read properties of undefined (reading 'length')
Expected behavior
Plugin should return vfile correctly.
The issue gets fixed, when I add a safety mechanism:
Related issues:
#12
#11
Runtime
[email protected]
Package manager
[email protected]
Operating system
Windows 11
Build and bundle tools
Astro
The text was updated successfully, but these errors were encountered: