Browse Source

chore: exit early if value is undefined

master
Kiko Beats 3 years ago
committed by GitHub
parent
commit
a1595c8fc4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/core/src/index.js

2
packages/core/src/index.js

@ -107,6 +107,8 @@ 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