forbid "undefined" cache value
This commit is contained in:
parent
fff2032a81
commit
2257875db7
|
|
@ -26,7 +26,7 @@ module.exports = function(options = {}) {
|
|||
}
|
||||
},
|
||||
set: (key, value, maxAge) => {
|
||||
if (!value) {
|
||||
if (!value || value === 'undefined') {
|
||||
value = '';
|
||||
}
|
||||
if (typeof value === 'object') {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ module.exports = function(options = {}) {
|
|||
}
|
||||
},
|
||||
set: async (key, value, maxAge) => {
|
||||
if (!value) {
|
||||
if (!value || value === 'undefined') {
|
||||
value = '';
|
||||
}
|
||||
if (typeof value === 'object') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue