fix bug, jsonOps is array not string

This commit is contained in:
Brian Gough 2017-05-22 15:20:28 +01:00
parent 54ad45c870
commit a3947c587f

View file

@ -162,7 +162,8 @@ module.exports = RedisManager =
return callback(error)
jsonOps = appliedOps.map (op) -> JSON.stringify op
if jsonOps.indexOf("\u0000") != -1
for op in jsonOps
if op.indexOf("\u0000") != -1
error = new Error("null bytes found in jsonOps")
logger.error err: error, doc_id: doc_id, jsonOps: jsonOps, error.message
return callback(error)