From d54eed326023434347ac393d5ca0fc92b121c777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Rebours?= Date: Fri, 28 Jan 2022 13:17:15 +0100 Subject: [PATCH] simplify setAutocompactionInterval --- lib/datastore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datastore.js b/lib/datastore.js index 32a8f6a..38629ea 100755 --- a/lib/datastore.js +++ b/lib/datastore.js @@ -343,7 +343,7 @@ class Datastore extends EventEmitter { setAutocompactionInterval (interval) { const minInterval = 5000 if (Number.isNaN(Number(interval))) throw new Error('Interval must be a non-NaN number') - const realInterval = Math.max(Number(interval) || 0, minInterval) + const realInterval = Math.max(Number(interval), minInterval) this.stopAutocompaction()