Skip to content
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

Unmounting Error When Output Limit Exceeds View #776

Closed
MrPurpleProgrammer opened this issue Apr 21, 2022 · 1 comment
Closed

Unmounting Error When Output Limit Exceeds View #776

MrPurpleProgrammer opened this issue Apr 21, 2022 · 1 comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Milestone

Comments

@MrPurpleProgrammer
Copy link

MrPurpleProgrammer commented Apr 21, 2022

Issue summary

This function in /node_modules/jquery.terminal/js/jquery.terminal.js at Line 7341 has a minor bug regarding the variable "lines".
This variable is an object, but the index is being called as though it is an array. What you guys want to actually call is lines._lines array within the object.

function unmount(node) { var index = node.data('index'); var line = lines[index]; var options = line[1]; if (is_function(options.unmount)) { options.unmount.call(self, node); } }

Change to:

function unmount(node) { var index = node.data('index'); var line = lines._lines[index]; var options = line[1]; if (is_function(options.unmount)) { options.unmount.call(self, node); } }

Expected behavior

When the Output limit exceeds the view it shouldnt throw an error, but rather clear the terminal.

Actual behavior

Screen Shot 2022-04-21 at 5 54 38 PM

Steps to reproduce

In any jquery application, exceed the output limit by spamming some bogus codes. Itll eventually throw this error.

Browser and OS

Chrome, MacOS

Additional notes

@jcubic
Copy link
Owner

jcubic commented Apr 21, 2022

This is old code before lines were changed to Object. I've missed this place when refactored and the tests didn't catch that error because an error is not visible on the terminal and it's thrown with setTimeout (that is there to prevent infinite loops when printing errors on the terminal - or to prevent printing duplicated errors).

@jcubic jcubic added the Bug label Apr 21, 2022
@jcubic jcubic modified the milestones: 2.24.0, 2.33.0 Apr 21, 2022
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label May 3, 2022
@jcubic jcubic closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

2 participants