Fix typo, clear interval to be safe

This commit is contained in:
charsyチャーシィ 2021-02-15 16:52:23 -07:00 committed by GitHub
parent 16b411c641
commit 8b289a4bc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -105,8 +105,9 @@ class Quota {
var allowance = params.allowance || this.allowance || Quota.PARAMS_OFFLINE.allowance;
var max = params.max || this.max || Quota.PARAMS_OFFLINE.max;
var maxHistLen = params.maxHistLen || this.maxHistLen || Quota.PARAMS_OFFLINE.maxHistLen;
let interval = params.interval || 0
this.inverval = setInterval(() => {
let interval = params.interval || 0;
clearInterval(this.interval);
this.interval = setInterval(() => {
this.tick();
}, params.interval)
if (allowance !== this.allowance || max !== this.max || maxHistLen !== this.maxHistLen) {
@ -155,4 +156,4 @@ class Quota {
};
}
module.exports = Quota
module.exports = Quota