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

remove javascript warning when clicking on leaf element #61

Merged
merged 4 commits into from Apr 19, 2022

Conversation

shadowwa
Copy link
Contributor

when clicking on leaf element, there is a javacript warning
Uncaught TypeError: n is null
By testing and exiting early if event.target.closest(".krumo-expand") returned null, the javascript warning disapears

Shadow Walker added 2 commits April 17, 2022 20:16
when clicking on leaf element, there is a javacript warning
  Uncaught TypeError: n is null
javascript-minifier.com redirect to https://www.toptal.com/developers/javascript-minifier/
and war that API endpoint has changed
@scottchiefbaker
Copy link
Collaborator

Wow... I'm not sure how I never noticed this before. Maybe I don't click on a lot of leaf elements :)

I'm OK with the change that tests if the element is null. What's up with the other change to the minimizing URL?

@shadowwa
Copy link
Contributor Author

just that when i tried to use to command line to minify the .js I got an error. Going to javascript-minifier.com, i got redirected to https://www.toptal.com/developers/javascript-minifier/ so I just updated the URL.

js/krumo.js Outdated
event.stopPropagation();
return;
}
is_expanded = !elem.classList.contains("krumo-opened");
Copy link
Owner

Choose a reason for hiding this comment

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

You can move the var is_expanded to here.

Copy link
Contributor Author

@shadowwa shadowwa Apr 19, 2022

Choose a reason for hiding this comment

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

ok, I moved the variable declaration

@scottchiefbaker
Copy link
Collaborator

This looks good to me

@mmucklo mmucklo merged commit b0b237d into mmucklo:master Apr 19, 2022
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.

None yet

3 participants