-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Accessing then
on a function
or object
throws within the getThen
helper
#346
Comments
promise is defined as the argument: es6-promise/lib/es6-promise/-internal.js Line 31 in 314e483
And there is no |
We can likely fast path that codepath with some extra checks. Will investigate in the AM |
If this is an issue at the "then"able check on es6-promise/lib/es6-promise/-internal.js Lines 106 to 107 in 314e483
Usually |
@hilbix do you have a scenario in mind where that would occur? |
@stefanpenner Not particular. This is what I see in the code, not by direct observation. Sorry. Perhaps I was't clear enough to express my thoughts, so 2nd try here ;) The OP writes, that
However this is guarded by es6-promise/lib/es6-promise/utils.js Lines 1 to 4 in 314e483
Even if Well, yes, we can create objects and functions which do not allow access to the property So what's left? The only thing I can think of is, that, perhaps, the OP returned some IE11-special object from the Promise, which gives either In that case, the OP should, please, tell us which type of object the Read: There definitively is too few information to be able to solve this riddle here. |
@hilbix I agree with your analysis. |
then
on a function
or object
throws within the getThen
helper
Here we try to get the
then
method from an undefined thing calledpromise
.es6-promise/lib/es6-promise/-internal.js
Line 33 in 314e483
I think it should look like
Promise.then
, sincePromise
is defined.I've seen this in IE11 (no Promise there) and we always run into the
catch
branch. I'v thought that this is not its intention.The text was updated successfully, but these errors were encountered: