fix cache type

This commit is contained in:
DIYgod
2019-04-21 20:19:54 +08:00
parent 9a838db0f6
commit ec9f9aa018
2 changed files with 6 additions and 6 deletions

View File

@@ -5,12 +5,12 @@ module.exports = async (ctx, next) => {
// decode HTML entities
if (ctx.state.data) {
ctx.state.data.title && (ctx.state.data.title = he.decode(ctx.state.data.title));
ctx.state.data.description && (ctx.state.data.description = he.decode(ctx.state.data.description));
ctx.state.data.title && (ctx.state.data.title = he.decode(ctx.state.data.title + ''));
ctx.state.data.description && (ctx.state.data.description = he.decode(ctx.state.data.description + ''));
ctx.state.data.item &&
ctx.state.data.item.forEach((item) => {
item.title && (item.title = he.decode(item.title));
item.description && (item.description = he.decode(item.description));
item.title && (item.title = he.decode(item.title + ''));
item.description && (item.description = he.decode(item.description + ''));
});
}