diff --git a/lib/redis-backend.js b/lib/redis-backend.js index 1a170a8..dc48d6d 100644 --- a/lib/redis-backend.js +++ b/lib/redis-backend.js @@ -17,8 +17,8 @@ var JSONBSerializer = require('./jsonb-serializer'); var NullCompressor = require('./null-compressor'); function bufferToString(buffer) { - if (!buffer) return null; if (typeof buffer === 'string') return buffer; + if (!buffer) return null; return buffer.toString('utf8'); }