simplify setAutocompactionInterval

pull/11/head
Timothée Rebours 3 years ago
parent bf5e5e2218
commit d54eed3260
  1. 2
      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()

Loading…
Cancel
Save