Authored by 郭成尧

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

Hotfix/md5err



See merge request !1192
@@ -344,11 +344,13 @@ const listNew = (req, res, next) => { @@ -344,11 +344,13 @@ const listNew = (req, res, next) => {
344 seoTitle = stringProcess.decodeURIComponent(paramsTitle); 344 seoTitle = stringProcess.decodeURIComponent(paramsTitle);
345 } 345 }
346 346
347 - try {  
348 - categoryIntroRedis =  
349 - yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200);  
350 - } catch (e) {  
351 - logger.error('redis.hmgetAsync.category.description:' + e); 347 + if (seoTitle) {
  348 + try {
  349 + categoryIntroRedis =
  350 + yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); // eslint-disable-line
  351 + } catch (e) {
  352 + logger.error('redis.hmgetAsync.category.description:' + e);
  353 + }
352 } 354 }
353 355
354 let categoryIntro = categoryIntroRedis[1] ? { 356 let categoryIntro = categoryIntroRedis[1] ? {
@@ -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 = {