Authored by 郭成尧

Merge branch 'hotfix/md5err' into 'release/6.4'

Hotfix/md5err



See merge request !1192
@@ -344,12 +344,14 @@ const listNew = (req, res, next) => { @@ -344,12 +344,14 @@ const listNew = (req, res, next) => {
344 seoTitle = stringProcess.decodeURIComponent(paramsTitle); 344 seoTitle = stringProcess.decodeURIComponent(paramsTitle);
345 } 345 }
346 346
  347 + if (seoTitle) {
347 try { 348 try {
348 categoryIntroRedis = 349 categoryIntroRedis =
349 - yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); 350 + yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); // eslint-disable-line
350 } catch (e) { 351 } catch (e) {
351 logger.error('redis.hmgetAsync.category.description:' + e); 352 logger.error('redis.hmgetAsync.category.description:' + e);
352 } 353 }
  354 + }
353 355
354 let categoryIntro = categoryIntroRedis[1] ? { 356 let categoryIntro = categoryIntroRedis[1] ? {
355 title: categoryIntroRedis[0], 357 title: categoryIntroRedis[0],
@@ -44,7 +44,7 @@ const decodeURIComponent = (param) => { @@ -44,7 +44,7 @@ const decodeURIComponent = (param) => {
44 } 44 }
45 } 45 }
46 46
47 - return result; 47 + return result || '';
48 }; 48 };
49 49
50 module.exports = { 50 module.exports = {