summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2022-02-19 23:39:39 -0700
committerAlexis Hovorka <[email protected]>2022-02-19 23:39:39 -0700
commit15605b9918047498c32362eeaf6ba62ccf2dc095 (patch)
tree1cb83c04f6ddf3b344fff75c414e36509a9433a0 /app.js
parent7e41581a34fe4a479dbd32fc44dcbb16f5540493 (diff)
[feat] First playable
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});