Commit 4b9f424c authored by tywldx's avatar tywldx

fixbug

parent 17a5235d
......@@ -22,7 +22,11 @@ module.exports = {
get: function (ctx, key) {
return this.client.getAsync(`${ctx.request.ip}${key}`).then(function(records){
try {
return JSON.parse(records).val
if (!!!records){
return null
}else{
return JSON.parse(records).val
}
} catch (error) {
return error
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment