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
Support detection of indexedDB window variable #999
base: master
Are you sure you want to change the base?
Conversation
@tofumatt Interested in your thoughts on this. It seems Chrome has (or recently has moved to) a different variable name for indexedDB. |
I'll take a look at this over the weekend (sorry, bit of a busy week for me right now), but I'm surprised this is an issue, as I think the |
@tofumatt Here's a screenshot that might help. From |
PS. I have confirmed in testing and in production that this patch does fix the issue. |
Bump. |
@lincolnthree you have fundamentally misunderstood the problem. The browser has never had a I'd guess that you are using a bundler which runs the check for If you ask me, the real solution would be to release a new major version of if (!indexedDB?.open) { |
@atjn Whether you intended to or not, a non-zero amount of condescension has come through in your response. Absent any real feedback or help from the maintainer in this situation, and without an expert understanding of every line of how Now that we have that out of the way, I appreciate that you've suggested a better solution. My fix (correct or not) has been working in production for the past two years with no crash reports or bugs submitted from users, so I'm fine with whatever you decide is the right path forward. Best of luck. |
@lincolnthree I am very sorry, it was not my intention to be condescending. I was trying to be as clear and convincing as possible, and reading it again, I can see that that accidentally also made it condescending. |
@atjn Thanks. I appreciate your response. It's easy to mis-interpret written communication, too. So I can own that part as well. Thanks for contributing an updated solution, and for supporting the need for a fix. I agree that I think upgrading to IndexedDB 2 would probably be ideal. At this point, given the stats you cited on browser support/usage, it just makes sense. Doing it in a 100% backwards compatible way would also be helpful for some, but probably not necessary depending on the users for a given application. Certainly wouldn't matter for us if IE weren't supported. Hah. Anyway, thanks again and who knows. Maybe this will get fixed sometime :) |
Support detection of indexedDB window variable using Chrome supported variable name.
This seems to fix some race conditions that cause the indexeddb driver to fail detection and move on to the next configured driver (a very odd situation with little fallback)
On another note, it might be nice to get a console warning or callback when driver fallback has occurred.