Fix js error when no linting issues exist

This commit is contained in:
Rob Garrison 2017-08-18 09:35:02 -05:00
parent 12a09976f2
commit c2e294beff

View File

@ -151,7 +151,7 @@ function renderLintReport(someBlockChanged) {
function resizeLintReport() {
const magicBuffer = 20; // subtracted value to prevent scrollbar
const content = $('#lint table');
if (content.children.length) {
if (content) {
const bounds = content.getBoundingClientRect();
const newMaxHeight = bounds.bottom <= window.innerHeight ? '' :
// subtract out a bit of padding or the vertical scrollbar extends beyond the viewport