chat: stop console error after clicking marsey emoji speed modal (#119)

Kindly,

As per $title. This is just a suggestion implementation

Whenever we click any marsey in the speed modal, it generates an error in developer tools console because markdown() is not defined. I suspect not being available is expected because that function is for re-rendering the markdown preview (????? when I look at chat code it is all spaghette to me)

Thanks,
granny

Reviewed-on: #119
Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>
pull/121/head
mummified-corroding-granny 2023-02-13 18:57:52 +00:00 committed by Aevann
parent 862b36bf85
commit 2cf1300498
1 changed files with 3 additions and 1 deletions

View File

@ -444,7 +444,9 @@ function populate_speed_emoji_modal(results, textbox)
speed_carot_modal.style.display = "none";
textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "g"), `:${result}:`)
textbox.focus()
markdown(textbox)
if (document.location.pathname != '/chat'){
markdown(textbox)
}
});
// Pack
emoji_option.appendChild(emoji_option_img);