diff --git a/src/games/mash.js b/src/games/mash.js index b2dbea7..32332b9 100755 --- a/src/games/mash.js +++ b/src/games/mash.js @@ -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);