Fixed missing definition breaking mash.

This commit is contained in:
ThePendulum
2024-08-24 18:01:08 +02:00
parent 84025d6a8b
commit 8c7995340e

View File

@@ -153,6 +153,10 @@ function define(word, context) {
}
function sanitizeDefinition(definition, answers) {
if (!definition) {
return 'No definition';
}
return definition.replaceAll(/\w+/g, (word) => {
if (answers.some((answer) => answer.word.includes(word))) {
return '*'.repeat(word.length);