forbid "undefined" cache value

This commit is contained in:
DIYgod
2018-11-19 11:43:08 +08:00
parent fff2032a81
commit 2257875db7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ module.exports = function(options = {}) {
}
},
set: (key, value, maxAge) => {
if (!value) {
if (!value || value === 'undefined') {
value = '';
}
if (typeof value === 'object') {
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = function(options = {}) {
}
},
set: async (key, value, maxAge) => {
if (!value) {
if (!value || value === 'undefined') {
value = '';
}
if (typeof value === 'object') {