You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This object unfortunately evaluates as truthy and therefore requires the user to check if keys are present in the object to determine whether the hash actually existed.
This appears to differ from the current behavior of both get and hget.
Example
constfoo=awaitcontext.redis.hgetall('foo');// no hash actually exists at key 'foo'if(foo){console.log('foo is true');// this will be output}console.log(foo);// [Object object]
The text was updated successfully, but these errors were encountered:
Info
If a given key does not exist,
hgetall
returns an empty object rather thanundefined
as the typehint suggests.devvit/packages/public-api/src/types/redis.ts
Line 511 in fb29ce4
This object unfortunately evaluates as truthy and therefore requires the user to check if keys are present in the object to determine whether the hash actually existed.
This appears to differ from the current behavior of both
get
andhget
.Example
The text was updated successfully, but these errors were encountered: