-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(defineDriver): set up custom drivers syncronously if there's no _support property or it's not a function #692
Conversation
44dbfe1
to
031edbb
Compare
_support property or it's not a function. Closes localForage#686 Closes localForage#692
031edbb
to
0225cee
Compare
_support property or it's not a function. Closes localForage#686 Closes localForage#692
0225cee
to
34f1e7a
Compare
_support property or it's not a function. Closes localForage#686 Closes localForage#692
34f1e7a
to
771fad6
Compare
_support property or it's not a function. Closes localForage#686 Closes localForage#692
@@ -343,7 +343,7 @@ if (typeof global.Promise !== 'function') { | |||
},{"2":2}],4:[function(_dereq_,module,exports){ | |||
'use strict'; | |||
|
|||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | |||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why this line is changing. Should this be part of the commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you just did a fresh npm install
then don't worry about it.
It would be great if the dist
files were in a different commit, but it's not mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's it. I separated the code into two commits 👍
I think that the code should be moved outside the |
I think it's guaranteed that the constructor will run immediately: From MDN (emphasis mine):
From promisejs.org (emphasis also mine):
However, if you still feel it's safer to move the code outside the constructor, I'll make the change. |
My bad 😞 |
_support property or it's not a function. Closes localForage#686 Closes localForage#692
_support property or it's not a function.
771fad6
to
c523f90
Compare
Thanks for this!! |
Thanks for the tests, I had taken a look and was planning on doing something very similar to what you did. 👍 |
This addresses #686 according to #686 (comment).