outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 590 forks source link

Create link with '/' command will cause Uncaught TypeError: assert_1.default is not a function #572

Closed Aaron-Hu closed 2 years ago

Aaron-Hu commented 2 years ago

To Reproduce

  1. start a new line, and create a link with '/' image
  2. input any url image
  3. click to confirm image

this error may cause the page crush

Aaron-Hu commented 2 years ago

Seems link "yarn build" will convert assert(from === to); to assert_1.default(from === to); The original code:

    const { from, to } = state.selection;
    assert(from === to);

The code after build:

            const { from, to } = state.selection;
            assert_1.default(from === to);
tommoor commented 2 years ago

@Aaron-Hu to confirm this is in your own app? You can't reproduce in the storybook demo?

Aaron-Hu commented 2 years ago

@tommoor yes, i am using it with yarn add rich-markdown-editor and can't reproduce in the storybook demo.

tommoor commented 2 years ago

You should find this resolved in v11.18.12