remarkjs / remark-directive

remark plugin to support directives
https://remark.js.org
MIT License
250 stars 15 forks source link

Cannot read properties of undefined (reading 'push') #7

Closed Saul-Mirone closed 2 years ago

Saul-Mirone commented 2 years ago

Initial checklist

Affected packages and versions

remark-directive@2.0.1

Link to runnable example

https://codesandbox.io/s/milkdown-custom-syntax-mudgd?from-embed

Steps to reproduce

As the link above show, when I use remark-directive@2.0.0, everything works fine. However if I use 2.0.1, it will crash with error: Cannot read properties of undefined (reading 'push')

Expected behavior

I expected to have no error for a patch version change.

Actual behavior

Crash for v2.0.1, work well for v2.0.0

Runtime

Other (please specify in steps to reproduce)

Package manager

pnpm

OS

Windows

Build and bundle tools

Webpack

ChristianMurphy commented 2 years ago

Sorry to hear you ran into a spot of trouble. I tried updating the example you provided with remark-directive 2.0.1 and am not seeing this issue https://codesandbox.io/s/milkdown-custom-syntax-2-0-1-31ist I also tried isolating the changes to use just remark and rehype, I'm not seeing the issue either https://codesandbox.io/s/remark-rehype-directive-jpjxq The changes in 2.0.1 are also documentation only https://github.com/remarkjs/remark-directive/compare/2.0.0...2.0.1 :thinking:

Is there any other context you could provide @Saul-Mirone?

github-actions[bot] commented 2 years ago

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing more info. It’s not clear yet whether this is an issue. Here are a couple tips:

Thanks, — bb

Saul-Mirone commented 2 years ago

Sorry to hear you ran into a spot of trouble.

I tried updating the example you provided with remark-directive 2.0.1 and am not seeing this issue https://codesandbox.io/s/milkdown-custom-syntax-2-0-1-31ist

I also tried isolating the changes to use just remark and rehype, I'm not seeing the issue either https://codesandbox.io/s/remark-rehype-directive-jpjxq

The changes in 2.0.1 are also documentation only https://github.com/remarkjs/remark-directive/compare/2.0.0...2.0.1 :thinking:

Is there any other context you could provide @Saul-Mirone?

Hi, forget to say. Please input some words in the editor to trigger the crash.

wooorm commented 2 years ago

Some ideas:


Closing as this is not an issue that can be solved here.