Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.7版本Swagger集成MiniProfiler功能Bug #195

Closed
xzh1995112 opened this issue Dec 11, 2020 · 1 comment
Closed

3.1.7版本Swagger集成MiniProfiler功能Bug #195

xzh1995112 opened this issue Dec 11, 2020 · 1 comment
Labels
Bug 🐛 有虫,来捉虫 Fixed ✔️ bug已修复 Useful 💯 对于解决问题有帮助
Milestone

Comments

@xzh1995112
Copy link

描述一下BUG

3.1.7版本的OSharp.Swagger中使用MiniProfiler后,Swagger主页会发生js异常,导致MiniProfiler插件无法使用

重现步骤

  1. 启动类: Startup.cs => 方法:ConfigureServices => 添加模块:MiniProfilerPack
  2. 打开 Swagger index.html
  3. 按F12 打开浏览器控制台
  4. 查看错误信息: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

期望行为

在OSharp.Swagger模块的index.html 页面id为mini-profiler的script标签里添加【data-scheme=""】这一属性即可解决MiniProfiler插件无法使用的问题

附加上下文,如截图

修复前

MiniProfiler插件不显示截图
image

控制台js报错截图
image

修复后

Swagger index.html页面
image

MiniProfiler插件正常显示截图
image

控制台截图(已无js报错信息)
image

运行环境

Desktop (please complete the following information):

  • Version 10
  • OS: Windows
  • Browser Chrome
@xzh1995112
Copy link
Author

添加:data-scheme="light" 或者 data-scheme="dark" 都可以

@gmf520 gmf520 added Bug 🐛 有虫,来捉虫 Useful 💯 对于解决问题有帮助 labels Dec 11, 2020
@gmf520 gmf520 added the Fixed ✔️ bug已修复 label Dec 11, 2020
@gmf520 gmf520 closed this as completed Dec 11, 2020
@gmf520 gmf520 added this to the v3.1.12 milestone Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 有虫,来捉虫 Fixed ✔️ bug已修复 Useful 💯 对于解决问题有帮助
Projects
None yet
Development

No branches or pull requests

2 participants