-
-
Notifications
You must be signed in to change notification settings - Fork 558
Fixed JS error on the main page of the site #1013 #1031
Conversation
You can view the preview now! Built with commit c75a851 |
assets/js/index.js
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed the extra space in the checkSidebar() function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MSTEWARDSON Thank you for the quick analysis and fixing the problem!
Could you make the same improvement to the footer code below in this same function?
Sure I will work on that now. |
Alright I added the check to the footer section of the function now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MSTEWARDSON Super! Thank you very much. We will be glad if you can help us in other tasks.
@shahednasser I propose to merge this PR.
Awesome thanks for your work and detailed description! @all-contributors please add @MSTEWARDSON for code and bug |
I've put up a pull request to add @MSTEWARDSON! 🎉 |
Perfect, thanks! |
Fixed the undefined error that came up for the 'left' value of viewport on the main page. After looking through the code I determined the issue was caused within the function checkSideBar(). Here the html element 'main-head' was used to call the isOnScreen() function. The issue with this and why the error only happened on the homepage was because the homepage does not use the 'main-head' css class.
To fix this issue there is now a check to see if the 'main-head' element exists using .length.
Issue: JS error on the main page of the site #1013