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()