From 10fd2e13349a28e4f254ec9fee96cd08a0d6a7f2 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:23:25 +0300 Subject: [PATCH] #2395 Treat default example as empty --- public/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/script.js b/public/script.js index 85978a2ed..99c7c1e66 100644 --- a/public/script.js +++ b/public/script.js @@ -272,12 +272,12 @@ toastr.options.timeOut = 4000; // How long the toast will display without user i toastr.options.extendedTimeOut = 10000; // How long the toast will display after a user hovers over it toastr.options.progressBar = true; // Visually indicate how long before a toast expires. toastr.options.closeButton = true; // enable a close button -toastr.options.positionClass = "toast-top-center"; // Where to position the toast container +toastr.options.positionClass = 'toast-top-center'; // Where to position the toast container toastr.options.onHidden = () => { // If we have any dialog still open, the last "hidden" toastr will remove the toastr-container. We need to keep it alive inside the dialog though // so the toasts still show up inside there. fixToastrForDialogs(); -} +}; // Allow target="_blank" in links DOMPurify.addHook('afterSanitizeAttributes', function (node) { @@ -3439,7 +3439,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro * @returns {string[]} Examples array with block heading */ function parseMesExamples(examplesStr) { - if (examplesStr.length === 0) { + if (examplesStr.length === 0 || examplesStr === '') { return []; } @@ -10774,4 +10774,4 @@ jQuery(async function () { }); initCustomSelectedSamplers(); -}); \ No newline at end of file +});