Skip to content

Commit 69e36a3

Browse files
committed
fix json display
1 parent 32a2bab commit 69e36a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/notification/modals/error-viewer/error-viewer-modal.element.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export class UmbErrorViewerModalElement extends UmbModalBaseElement<UmbErrorView
3232

3333
public override set data(value: UmbErrorViewerModalData | undefined) {
3434
super.data = value;
35-
console.log(value, typeof value);
3635
// is JSON:
3736
if (typeof value === 'string') {
3837
this._displayLang = 'String';
@@ -49,7 +48,9 @@ export class UmbErrorViewerModalElement extends UmbModalBaseElement<UmbErrorView
4948
override render() {
5049
return html`
5150
<umb-body-layout headline=${this.localize.term('defaultdialogs_seeErrorDialogHeadline')} main-no-padding>
52-
${this.data ? html`<umb-code-block language=${this._displayLang} copy>${this.data}</umb-code-block>` : nothing}
51+
${this.data
52+
? html`<umb-code-block language=${this._displayLang ?? ''} copy>${this._displayError}</umb-code-block>`
53+
: nothing}
5354
<div slot="actions">
5455
<uui-button label=${this.localize.term('general_close')} @click=${this._rejectModal}></uui-button>
5556
</div>

0 commit comments

Comments
 (0)