Skip to content

Commit

Permalink
Fix: use keys() without pattern (#8)
Browse files Browse the repository at this point in the history
This fix prevents the error below...

```
node_redis: Deprecated: The KEYS command contains a "undefined" argument.
This is converted to a "undefined" string now and will return an error from v.3.0 on.
Please handle this in your code to make sure everything works as you intended it to.
```
  • Loading branch information
homerjam authored and dabroek committed Jun 11, 2018
1 parent f010c19 commit 622136c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const redisStore = (...args) => {
redisCache.flushdb(handleResponse(cb));
})
),
keys: (pattern, cb) => (
keys: (pattern = '*', cb) => (
new Promise((resolve, reject) => {
if (typeof pattern === 'function') {
cb = pattern;
Expand Down

0 comments on commit 622136c

Please sign in to comment.