outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:

Home Page:https://www.getoutline.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Aaron-Hu opened this issue · comments

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

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);

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

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

You should find this resolved in v11.18.12