need not send message to server when set undefined value #403

merged 1 commit into from Mar 17, 2013


None yet

3 participants


now there is a problem when set undefined or null value, for example:

client.set('key', undefined, function (err) {
  client.get('key', function (err, item) {
    console.log(typeof item, item);


string undefined

the datatype is changed (undefined changed to string), and if value is invalid , client need not send message to server.

@brycebaril brycebaril merged commit 78d8f9e into NodeRedis:master Mar 17, 2013
NodeRedis member

Already merged -- @DTrejo if someone was trying to delete values by setting them to undefined before, they were not succeeding, it was stringifying "null" or "undefined" and setting the values to those -- pretty much guaranteed not to be what you want.

Thanks for the help, @jifeng

NodeRedis member

It seems unlikely anyone would have been relying on this behavior in a good way. If they really wanted the result of client.set("foo", undefined, function () {}) they could have just done client.set("foo", "undefined").

I don't think this alone is enough to make us worry about major vs. minor releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment