Don't pre-render PM error if empty

This commit is contained in:
Cohee 2024-05-29 17:23:37 +03:00
parent 097894308e
commit b904f501ba
1 changed files with 2 additions and 2 deletions

View File

@ -1348,11 +1348,11 @@ class PromptManager {
const promptManagerDiv = this.containerElement;
promptManagerDiv.innerHTML = '';
const errorDiv = `
const errorDiv = this.error ? `
<div class="${this.configuration.prefix}prompt_manager_error">
<span class="fa-solid tooltip fa-triangle-exclamation text_danger"></span> ${DOMPurify.sanitize(this.error)}
</div>
`;
` : '';
const totalActiveTokens = this.tokenUsage;