Skip to content

RichTextEditor: Ensure prevLine is defined before subsequently calling .split on it #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

rosslavery
Copy link

@rosslavery rosslavery commented Jul 29, 2019

Ensures that prevLine is defined before calling split on it, as well as any other function calls that follow.

Prevents the following error:

core.js:15723 ERROR TypeError: Cannot read property 'split' of undefined
    at MDLists.push../node_modules/@syncfusion/ej2-richtexteditor/src/markdown-parser/plugin/lists.js.MDLists.enterKey (lists.js:259)
    at MDLists.push../node_modules/@syncfusion/ej2-richtexteditor/src/markdown-parser/plugin/lists.js.MDLists.keyUpHandler (lists.js:44)
    at Observer.push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:99)
    at MarkdownParser.push../node_modules/@syncfusion/ej2-richtexteditor/src/markdown-parser/base/markdown-parser.js.MarkdownParser.editorKeyUp (markdown-parser.js:54)
    at Observer.push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:99)
    at MarkdownFormatter.push../node_modules/@syncfusion/ej2-richtexteditor/src/rich-text-editor/formatter/formatter.js.Formatter.onKeyHandler (formatter.js:102)
    at RichTextEditorComponent.push../node_modules/@syncfusion/ej2-richtexteditor/src/rich-text-editor/base/rich-text-editor.js.RichTextEditor.keyUp (rich-text-editor.js:395)
    at HTMLTextAreaElement.__trace__ (bugsnag.js:2211)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:17289)

@rosslavery rosslavery changed the title Ensure prevLine is defined before subsequently calling .split on it RichTextEditor: Ensure prevLine is defined before subsequently calling .split on it Jul 29, 2019
@pandiyarajm
Copy link

pandiyarajm commented Aug 2, 2019

Hi @rosslavery ,

Greetings from Syncfusion support.

We have tried to reproduce the issue that you have done the source changes, but we were not able to reproduce the issue at our end. Could you please share the details which scenario cause issue, without this changes that will be helpful for us to get the actual issue?

  1. Share the example code block
  2. Share the stack trace if any script error is thrown

Regards,
Pandiyaraj M

@Sridhar-Narasimhan
Copy link

We are closing this thread now since there is no activity and long pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants