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
We have a strange issue using this lib, which is only reproducible in our production builds:
TypeError: Cannot read properties of undefined (reading 'list')
at react-anchorme.esm.js:1:1275
at react-anchorme.esm.js:1:1550
at Object.useMemo (react-dom.production.min.js:184:189)
at Er.useMemo (react.production.min.js:25:208)
at react-anchorme.esm.js:1:1530
at eK (react-dom.production.min.js:167:137)
at s$ (react-dom.production.min.js:197:258)
at Vge (react-dom.production.min.js:195:204)
at dre (react-dom.production.min.js:194:176)
at lbe (react-dom.production.min.js:297:71)
o$ @ react-dom.production.min.js:189
which I can pinpoint to line 16 in AnchorMe.tsx:
importReact,{useCallback,useMemo}from'react'importanchormefrom'anchorme'import{AnchorProps,LinkComponent}from'./types'import{Link}from'./Link'typeProps={children: stringlinkComponent?: LinkComponent}&AnchorPropsconstAnchorme=({ children, ...rest}: Props)=>{consttext=childrenconstparse=useCallback(()=>{constmatches=anchorme.list(text)// <- This right hereif(matches.length===0)returntext
...
What gives? It's as if the anchorme package isn't bundled for production?
Environment:
Build system: Vite
react-anchorme version: 4.0.1
react version: 18.2.0
The text was updated successfully, but these errors were encountered:
We have a strange issue using this lib, which is only reproducible in our production builds:
which I can pinpoint to line 16 in
AnchorMe.tsx
:What gives? It's as if the
anchorme
package isn't bundled for production?Environment:
The text was updated successfully, but these errors were encountered: