-
Notifications
You must be signed in to change notification settings - Fork 280
remove explicit construction #166
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
Conversation
The promise usage left some to be desired and I felt like I should help by refactoring out [explicit construction](http://stackoverflow.com/questions/23803743/what-is-the-explicit-promise-construction-antipattern-and-how-do-i-avoid-it/23803744#23803744) which I used to do myself when I started with promises. Thanks for the library.
|
This is very likely cool, but travis-pr should really be fixed :P |
|
Thanks for cleaning this up @benjamingr. @oliversalzburg looks like the failure is legitimate. The use of catch as it stands will break old IE, so we'll need to fix that. |
I caused a compatibility issue in stacktracejs#166 since reserved keywords can't be property names in ES3. This fixes it.
|
@benjamingr no worries at all. Much respect for following up and fixing it. |
|
Apologies @benjamingr and @oliversalzburg - I'm going to have to revert this for now. It's not immediately clear to me why this error is thrown when calling Furthermore, this changes behavior in 2 ways:
I'm willing to consider PRs to achieve a cleaner implementation in the future as long as they pass the tests. |
|
My bad :( The error |
|
@oliversalzburg There have been a lot of problems historically with PR builds, so I empathize. I have put a (annoyingly) lot of effort into PR builds, so they should be stable and useful from now on. |
Description
Removes explicit construction for promise code.
Motivation and Context
It's cleaner design.
How Has This Been Tested?
I did not test this at all but I've literally refactored code this way a thousand times.
Checklist:
node_modules/.bin/jscs -c .jscsrc stacktrace.jspasses without errorsnpm testpasses without errorsThe promise usage left some to be desired and I felt like I should help by refactoring out explicit construction which I used to do myself when I started with promises.
Thanks for the library.