Fixes pour possession
This commit is contained in:
@ -181,7 +181,7 @@ export class Misc {
|
||||
if (!single) {
|
||||
single = subset[0];
|
||||
const choices = Misc.join(subset.map(it => options.mapper(it)), '<br>');
|
||||
options.info(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${mapToValue(single)}`);
|
||||
options.onMessage(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${options.mapper(single)}`);
|
||||
}
|
||||
return single;
|
||||
}
|
||||
@ -200,7 +200,7 @@ export class Misc {
|
||||
}
|
||||
value = Grammar.toLowerCaseNoAccent(value);
|
||||
const subset = elements.filter(options.preFilter)
|
||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it)).includes(value));
|
||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value));
|
||||
if (subset.length == 0) {
|
||||
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user