Skip to content

Commit 0d154bb

Browse files
committed
fix error when no subtitle
1 parent e9e8adb commit 0d154bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/titles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function draw(gd, titleClass, options) {
205205
if(!titleElMathGroup) return;
206206

207207
var subtitleElement = d3.select(titleElMathGroup.node().parentNode).select('.' + subtitleClass);
208-
if(subtitleElement) {
208+
if(!subtitleElement.empty()) {
209209
var titleMathHeight = titleElMathGroup.node().getBBox().height;
210210
if(titleMathHeight) {
211211
// Increase the y position of the subtitle by the height of the title,

0 commit comments

Comments
 (0)