Correctly check when difficulty is not a number

This commit is contained in:
Dev 2023-11-01 11:36:13 +00:00
parent 9d3f6dc092
commit 90b76eab68

View File

@ -781,7 +781,7 @@ export class RepeatableQuestGenerator
const rewardSpreadConfig = repeatableConfig.rewardScaling.rewardSpread; const rewardSpreadConfig = repeatableConfig.rewardScaling.rewardSpread;
const reputationConfig = repeatableConfig.rewardScaling.reputation; const reputationConfig = repeatableConfig.rewardScaling.reputation;
if (isNaN(difficulty)) if (Number.isNaN(difficulty))
{ {
difficulty = 1; difficulty = 1;
this.logger.warning(this.localisationService.getText("repeatable-difficulty_was_nan")); this.logger.warning(this.localisationService.getText("repeatable-difficulty_was_nan"));