Skip to content

Commit 622136c

Browse files
homerjamdabroek
authored andcommitted
Fix: use keys() without pattern (#8)
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. ```
1 parent f010c19 commit 622136c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const redisStore = (...args) => {
146146
redisCache.flushdb(handleResponse(cb));
147147
})
148148
),
149-
keys: (pattern, cb) => (
149+
keys: (pattern = '*', cb) => (
150150
new Promise((resolve, reject) => {
151151
if (typeof pattern === 'function') {
152152
cb = pattern;

0 commit comments

Comments
 (0)