react-markdown-editor icon indicating copy to clipboard operation
react-markdown-editor copied to clipboard

Uncaught Error

Open mteichtahl opened this issue 4 years ago • 2 comments

I am currently wrapping <MarkdownEditor/> for use in an internal project

The wrapper is very simple (in its early stages) and shown below

const MarkdownTextarea: FunctionComponent<MarkdownTextareaProps> = ({ invalid, ...props }) => {
    const classes = useStyles();

    return (
        <MarkdownEditor height={400} visible={true} {...props} />
    );
};

We are testing this wrapper using

    const [value, setValue] = useState<string>("# This is a textarea")
    return (<MarkdownTextarea value={value} onChange={action('onChange')} />)

When validating in story book I see the following error which seems to repeat every 500ms.

MarkdownTextarea/Default/error: (5) ["Uncaught TypeError: Cannot read property 'apply' of undefined", "http://localhost:9090/vendors~main.1a2cfcd6df914474ab0d.hot-update.js", 5350, 61, TypeError]
0: "Uncaught TypeError: Cannot read property 'apply' of undefined"
1: "http://localhost:9090/vendors~main.1a2cfcd6df914474ab0d.hot-update.js"
2: 5350
3: 61
4: TypeError

Any guidance and advice in helping to troubleshoot this would be appreciated

mteichtahl avatar Feb 16 '21 23:02 mteichtahl

@mteichtahl Server side rendering?

jaywcjlove avatar Feb 17 '21 01:02 jaywcjlove

@mteichtahl Server side rendering?

Interesting. you may be right. It could be how storybook runs in dev mode. Ill experiment and update with findings.

mteichtahl avatar Feb 17 '21 01:02 mteichtahl