mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
b81b17afd3
@ -142,7 +142,7 @@ app.use(calendarRoute);
|
||||
app.use(translationsRoute);
|
||||
app.use(subscriptionRoute);
|
||||
|
||||
app.use(function (err, req, res) {
|
||||
app.use(function (err, req, res, _next) {
|
||||
console.error(formatError(err, req));
|
||||
res.status(500).send('Unexpected server error');
|
||||
req.db.close();
|
||||
|
@ -46,7 +46,7 @@ export class Example {
|
||||
|
||||
requiredMorphemesPresent(pronoun, counter = 0) {
|
||||
return this.parts(pronoun, counter).filter(part => part.variable)
|
||||
.every(part => pronoun.getMorpheme(part.str, counter) != null);
|
||||
.every(part => pronoun.getMorpheme(part.str, counter) !== null);
|
||||
}
|
||||
|
||||
format(pronoun) {
|
||||
@ -400,6 +400,9 @@ export class Pronoun {
|
||||
const options = this.morphemes[morpheme].split('&');
|
||||
|
||||
const result = options[counter % options.length];
|
||||
if (result === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return capital ? capitalise(result) : result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user