Merge branch 'feature/newGolbal' into release/5.6
Showing
1 changed file
with
4 additions
and
2 deletions
@@ -297,8 +297,10 @@ const getGlobalProductDetailData = (skn, channelNum, channel) => { | @@ -297,8 +297,10 @@ const getGlobalProductDetailData = (skn, channelNum, channel) => { | ||
297 | if (result.html && !_.get(result.html, 'code', '')) { | 297 | if (result.html && !_.get(result.html, 'code', '')) { |
298 | let regContent = /<body[^>]*>([\s\S]*)<\/body>/.exec(result.html); | 298 | let regContent = /<body[^>]*>([\s\S]*)<\/body>/.exec(result.html); |
299 | 299 | ||
300 | - html = regContent[1] || ''; | ||
301 | - html = html.replace(/<script.*?>.*?<\/script>/ig, ''); | 300 | + if (regContent && regContent.length) { |
301 | + html = regContent[1] || ''; | ||
302 | + html = html.replace(/<script.*?>.*?<\/script>/ig, ''); | ||
303 | + } | ||
302 | } | 304 | } |
303 | 305 | ||
304 | Object.assign(resData, result.header, { | 306 | Object.assign(resData, result.header, { |
-
Please register or login to post a comment