From 215e3b7a87cd7070ad844e8429d8ea61305b18d6 Mon Sep 17 00:00:00 2001 From: klofi Date: Mon, 30 Sep 2024 02:56:48 +0200 Subject: [PATCH] Fix globally imported CLIPBOARD_OPTIONS (#529) (#537) Co-authored-by: Ondrej Kovac --- lib/src/markdown.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/markdown.component.ts b/lib/src/markdown.component.ts index 3a275dc..5ccbf92 100644 --- a/lib/src/markdown.component.ts +++ b/lib/src/markdown.component.ts @@ -163,8 +163,8 @@ export class MarkdownComponent implements OnChanges, AfterViewInit, OnDestroy { const renderOptions: RenderOptions = { clipboard: this.clipboard, clipboardOptions: { - buttonComponent: this.clipboardButtonComponent, - buttonTemplate: this.clipboardButtonTemplate, + ...(this.clipboardButtonComponent && { buttonComponent: this.clipboardButtonComponent }), + ...(this.clipboardButtonTemplate && { buttonTemplate: this.clipboardButtonTemplate }), }, katex: this.katex, katexOptions: this.katexOptions,