Skip to content

Commit 10db45a

Browse files
committed
fix: fixes issue where trying to add a copy content button to a callout with no content
1 parent 523ca6a commit 10db45a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/callout/manager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ export default class CalloutManager extends Component {
7272
}
7373

7474
if (
75-
this.plugin.admonitions[type].copy ??
76-
this.plugin.data.copyButton
75+
content &&
76+
(this.plugin.admonitions[type].copy ??
77+
this.plugin.data.copyButton)
7778
) {
7879
let copy = content.createDiv("admonition-content-copy");
7980
setIcon(copy, "copy");

0 commit comments

Comments
 (0)