spumko/joi — pull request #355 by Dignifiedquire (2014-05-28 08:37:06+00:00)
Title: Don't rename when there is nothing to rename.

When using `rename` on an optional key and such a key does not exist `rename` creates a new key with `undefined` as the value.

This PR ensures that the there is something to rename and only then creates the new key.