Browse Source

Merge pull request #27 from microlinkhq/set

chore: exit early if value is undefined
master
Kiko Beats 3 years ago
committed by GitHub
parent
commit
d20914f268
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/core/src/index.js

1
packages/core/src/index.js

@ -107,6 +107,7 @@ class Keyv extends EventEmitter {
}
set (key, value, ttl) {
if (value === undefined) return false
const keyPrefixed = this._getKeyPrefix(key)
if (typeof ttl === 'undefined') {
ttl = this.options.ttl

Loading…
Cancel
Save