From 10db45aee7d13a926ba46ab91c1700e8dc120b17 Mon Sep 17 00:00:00 2001 From: Jeremy Valentine <38669521+valentine195@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:15:46 -0400 Subject: [PATCH] fix: fixes issue where trying to add a copy content button to a callout with no content --- src/callout/manager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callout/manager.ts b/src/callout/manager.ts index 9714947..a533537 100644 --- a/src/callout/manager.ts +++ b/src/callout/manager.ts @@ -72,8 +72,9 @@ export default class CalloutManager extends Component { } if ( - this.plugin.admonitions[type].copy ?? - this.plugin.data.copyButton + content && + (this.plugin.admonitions[type].copy ?? + this.plugin.data.copyButton) ) { let copy = content.createDiv("admonition-content-copy"); setIcon(copy, "copy");