Fixed missing definition breaking mash.
This commit is contained in:
parent
84025d6a8b
commit
8c7995340e
|
@ -153,6 +153,10 @@ function define(word, context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sanitizeDefinition(definition, answers) {
|
function sanitizeDefinition(definition, answers) {
|
||||||
|
if (!definition) {
|
||||||
|
return 'No definition';
|
||||||
|
}
|
||||||
|
|
||||||
return definition.replaceAll(/\w+/g, (word) => {
|
return definition.replaceAll(/\w+/g, (word) => {
|
||||||
if (answers.some((answer) => answer.word.includes(word))) {
|
if (answers.some((answer) => answer.word.includes(word))) {
|
||||||
return '*'.repeat(word.length);
|
return '*'.repeat(word.length);
|
||||||
|
|
Loading…
Reference in New Issue