【发布时间】:2018-10-14 14:56:50
【问题描述】:
我目前正在学习 ReactJS,我决定创建一个简单的应用程序。
堆栈是:
- 反应
- Redux
- 反应路由器
- DexieJS(索引数据库)
应用程序正在运行。问题是当我尝试在 Firefox 或隐身模式(在 Chrome 中)上测试它时,我收到了这个错误:
TypeError: Cannot read property 'apply' of undefined
任何人都知道我为什么会收到此错误以及我该如何处理?我发现IndexedDB在Firefox和隐身模式下都不可用,所以我尝试做一个简单的检查:
if(!window.indexedDB) {
alert('Indexed DB is not supported by your browser. If you are running in incognito mode, please use the normal mode.')
}
但这不起作用,我再次收到错误。
如果您想查看整个代码,这里是 Github 存储库: https://github.com/Webd01/BM
感谢您的帮助!
【问题讨论】:
标签: javascript reactjs redux indexeddb