mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed verification threshold when set to 0
no issue - if the verification threshold is 0, `_.get(..)` becomes falsy so we fallback to Infinity - this is not correct - we only want to default to Infinity if the value is not set - this commit explicitly compares the config value to `undefined` and sets the fallback accordingly
This commit is contained in:
parent
d7fbf94d91
commit
e834904125
1 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,8 @@ function reconfigureMembersAPI() {
|
|||
*/
|
||||
const fetchImportThreshold = async () => {
|
||||
const membersTotal = await membersService.stats.getTotalMembers();
|
||||
const volumeThreshold = _.get(config.get('hostSettings'), 'emailVerification.importThreshold') || Infinity;
|
||||
const configThreshold = _.get(config.get('hostSettings'), 'emailVerification.importThreshold');
|
||||
const volumeThreshold = (configThreshold === undefined) ? Infinity : configThreshold;
|
||||
const threshold = Math.max(membersTotal, volumeThreshold);
|
||||
|
||||
return threshold;
|
||||
|
|
Loading…
Add table
Reference in a new issue