Skip to content

Commit fc232ee

Browse files
committed
revealjs - test for existence before trying to clean 'div.quarto-auto-generated-content'
1 parent 2eab7cb commit fc232ee

File tree

1 file changed

+3
-3
lines changed
  • src/resources/formats/revealjs/plugins/support

1 file changed

+3
-3
lines changed

src/resources/formats/revealjs/plugins/support/support.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ window.QuartoSupport = function () {
335335
}
336336
}
337337

338-
function cleanEmptyAutpGeneratedContent(deck) {
338+
function cleanEmptyAutoGeneratedContent(deck) {
339339
const div = document.querySelector('div.quarto-auto-generated-content')
340-
if (div.textContent.trim() === '') {
340+
if (div && div.textContent.trim() === '') {
341341
div.remove()
342342
}
343343
}
@@ -358,7 +358,7 @@ window.QuartoSupport = function () {
358358
workaroundMermaidDistance(deck);
359359
handleWhiteSpaceInColumns(deck);
360360
// should stay last
361-
cleanEmptyAutpGeneratedContent(deck);
361+
cleanEmptyAutoGeneratedContent(deck);
362362
},
363363
};
364364
};

0 commit comments

Comments
 (0)