Skip to content
New issue

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

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

Already on GitHub? # to your account

BugFix 1302 undefined name #1336

Closed
wants to merge 4 commits into from
Closed

BugFix 1302 undefined name #1336

wants to merge 4 commits into from

Conversation

robonetphy
Copy link
Member

Resolve #1302
Remaining:

  • Cursor Removal form next Element in case of Delimiter Tool.
  • Update Change Log

* currentBlock !=undefined
* Ignore when KeyDown Element is null
*/
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined;
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock !== undefined;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* currentBlock !=undefined
* Ignore when KeyDown Element is null
*/
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined;
Copy link
Member

@neSpecc neSpecc Sep 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move the currentBlock !== undefined statement to the separate variable and describe this case (why it is counts as keydown on editor)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@neSpecc neSpecc marked this pull request as ready for review October 2, 2020 19:14
@neSpecc neSpecc requested a review from khaydarov as a code owner October 2, 2020 19:14
/**
* Transfer event when currentBlock defined and keyDownOnEditor is null
*/
if(currentBlock!== undefined && keyDownOnEditor===null){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(currentBlock!== undefined && keyDownOnEditor===null){
if(currentBlock !== undefined && keyDownOnEditor === null){

*/
if(currentBlock!== undefined && keyDownOnEditor===null){
this.Editor.BlockEvents.keydown(event);
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return;
return;

@robonetphy robonetphy closed this Oct 5, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Uncaught TypeError: Cannot read property 'name' of undefined
4 participants