当Google返回空白页时出现错误,出现意外的令牌=>

时间:2019-03-17 15:46:32

标签: javascript reactjs babel-polyfill google-search-console

我目前正在使用SPA React应用,但是当我尝试以Google身份获取时,出现空白页面,错误为Uncaught SyntaxError: Unexpected token =>。我确实安装了babel-polyfill,并且也将其作为首次导入导入。我已经阅读并尝试了多种方法,但是似乎无法解决,有人对此有经验吗?

网站为https://sharetune.nl

错误图像如下所示:

error

编辑:在我的app.js没有缩小的情况下,我试图以google的形式获取。错误在这段代码中

const prefix = (items) => {
  const result = {}
  for (const i in items) {
    result[items[i]] = swalPrefix + items[i]
  }
  return result
}

您可以在http://sharetune.nl/js/app.js上查看app.js文件

1 个答案:

答案 0 :(得分:0)

如上所述,google fetch bot使用的是Chrome 41-不支持箭头功能。

https://caniuse.com/#feat=arrow-functions