You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ThrottleMgr tests is currently failing due to a bug in the canThrottle() method.
When the dayInterval is set to number (currently 31)
The canThrottle() is calculating the dayCheck based on the current date and is not taking the previous date into consideration (like it is doing for the month)
let curDate = _getThrottleDate();
let date = localStorageObj.date;
let interval = config.interval;
let monthExpand = (curDate.getUTCFullYear() - date.getUTCFullYear()) * 12 + curDate.getUTCMonth() - date.getUTCMonth();
let monthCheck = _checkInterval(interval.monthInterval, 0, monthExpand);
let dayCheck = _checkInterval(interval.dayInterval, 0, curDate.getUTCDate()) -1;
return monthCheck >= 0 && dayCheck >= 0 && dayCheck <= config.interval.maxTimesPerMonth;
I believe it should be calculating the difference between the last day and the current day
curDate.getUTCDate() - date.getUTCDate()
The text was updated successfully, but these errors were encountered:
The ThrottleMgr tests is currently failing due to a bug in the canThrottle() method.
When the dayInterval is set to number (currently 31)
The canThrottle() is calculating the dayCheck based on the current date and is not taking the previous date into consideration (like it is doing for the month)
I believe it should be calculating the difference between the last day and the current day
curDate.getUTCDate() - date.getUTCDate()
The text was updated successfully, but these errors were encountered: