From b904f501ba8740c595482b69582db0ac0732168b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 29 May 2024 17:23:37 +0300 Subject: [PATCH] Don't pre-render PM error if empty --- public/scripts/PromptManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index 9be84ae70..1b09b13fe 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -1348,11 +1348,11 @@ class PromptManager { const promptManagerDiv = this.containerElement; promptManagerDiv.innerHTML = ''; - const errorDiv = ` + const errorDiv = this.error ? `
${DOMPurify.sanitize(this.error)}
- `; + ` : ''; const totalActiveTokens = this.tokenUsage;