chatgpt-demo icon indicating copy to clipboard operation
chatgpt-demo copied to clipboard

浏览器兼容不好,用360极速浏览器会报错

Open gentoo111 opened this issue 2 years ago • 7 comments
trafficstars

Describe the bug

本地运行后,用360极速浏览器无法聊天,控制台报错 3000/src/components/Generator.tsx:31 Uncaught (in promise) SyntaxError: Unexpected token '.'

Reproduction

http://localhost:3000/

System Info

mac 360极速浏览器

Used Package Manager

npm

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [X] The provided reproduction is a minimal reproducible of the bug.

gentoo111 avatar Mar 05 '23 16:03 gentoo111

放弃使用360,切换到 chrome

yubo9807 avatar Mar 06 '23 01:03 yubo9807

2023了还在使用国产浏览器?没必要因为这些淘汰的浏览器,去兼容旧代码,而拖慢运行速度!

hqw567 avatar Mar 06 '23 02:03 hqw567

大佬,能否留个联系方式指导菜逼我安装下

z50913 avatar Mar 06 '23 02:03 z50913

https://www.google.cn/intl/zh-CN/chrome/

yubo9807 avatar Mar 06 '23 03:03 yubo9807

复现了,是因为 mac 360极速浏览器不支持可选链操作符(?.)语法,该浏览器内核基于 Chromium 78,而 Chromium 80+ 才开始支持可选链操作符。

lxxxv5 avatar Mar 06 '23 04:03 lxxxv5

复现了,是因为 mac 360极速浏览器不支持可选链操作符(?.)语法,该浏览器内核基于 Chromium 78,而 Chromium 80+ 才开始支持可选链操作符。

chrome78是否有点过于旧了

M1saka10010 avatar Mar 06 '23 12:03 M1saka10010

复现了,是因为 mac 360极速浏览器不支持可选链操作符(?.)语法,该浏览器内核基于 Chromium 78,而 Chromium 80+ 才开始支持可选链操作符。

chrome78是否有点过于旧了

mac 360极速浏览器在 2019 年就发布了,后面没再推出新版

lxxxv5 avatar Mar 06 '23 15:03 lxxxv5

感谢大佬们,我们已经把不兼容的地方都改掉了,有如下几处: 兼容问题还是要解决一下 src/components/MessageItem.tsx { showRetry?.() && onRetry && ( { (showRetry&&showRetry()) && onRetry && ( src/components/Generator.tsx m: requestMessageList?.[requestMessageList.length - 1]?.content || '', m: requestMessageList && requestMessageList.length > 0 && requestMessageList[requestMessageList.length - 1] && requestMessageList[requestMessageList.length - 1].content ? requestMessageList[requestMessageList.length - 1].content : '', src/components/Generator.tsx if (window?.umami) umami.trackEvent('chat_generate') if (window && window.umami) umami.trackEvent('chat_generate')

gentoo111 avatar Mar 07 '23 01:03 gentoo111

2023了还在使用国产浏览器?没必要因为这些淘汰的浏览器,去兼容旧代码,而拖慢运行速度!

用国产浏览器的大把人,就这么个小项目,根本没必要考虑运行速度的问题。

gentoo111 avatar Mar 07 '23 01:03 gentoo111

放弃使用360,切换到 chrome

没办法啊,用习惯了

gentoo111 avatar Mar 07 '23 01:03 gentoo111

解决了,关闭

gentoo111 avatar Mar 07 '23 02:03 gentoo111