summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.js b/app.js
index 97e8c9b..7b5f25c 100644
--- a/app.js
+++ b/app.js
@@ -30,7 +30,7 @@ app.get("/guess/(?<word>[a-z]*)", cors((req, res, match) => {
match.word.split("").map(c => findAll(c, today()))
.map((c,i,a) => c.length === 0? " " : c.includes(i)? "=" : c)
.map((c,i,a) => Array.isArray(c)? c.filter(e => a[e] !== "=") : c)
- .reduce((a,c) => Array.isArray(c)? a+(c.find(e => !a.includes(e))||" ") : a+c, "")
+ .reduce((a,c) => Array.isArray(c)? a+(c.find(e => !a.includes(e))??" ") : a+c, "")
.replace(/[0-9]/g, "-");
sj(res, {word: match.word, result});