Commit 39c89fbb authored by Benjamin Abraham's avatar Benjamin Abraham
Browse files

Fix #2 add condition to check if element exist

parent 85e25dc9
......@@ -94,7 +94,9 @@ require(['theme_boost/drawer'], function(mod) {
else
$('#scroll-header').fadeOut(0);
document.getElementById("scroll-header").style.width = document.getElementById("page-header").offsetWidth - 30 + 'px';
if(document.getElementById("scroll-header")) {
document.getElementById("scroll-header").style.width = document.getElementById("page-header").offsetWidth - 30 + 'px';
}
$(window).resize(function() {
document.getElementById("scroll-header").style.width = document.getElementById("page-header").offsetWidth - 30 + 'px';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment