-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: add named arrow function for request and response handlers #805
Conversation
@@ -125,15 +125,18 @@ module.exports = class Application extends Emitter { | |||
|
|||
callback() { | |||
const fn = compose(this.middleware); | |||
const self = this; |
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.
self come back again...
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.
change back to named arrow function
ddf594b
to
8db28b1
Compare
8db28b1
to
9afa847
Compare
@@ -128,13 +128,16 @@ module.exports = class Application extends Emitter { | |||
|
|||
if (!this.listeners('error').length) this.on('error', this.onerror); | |||
|
|||
return (req, res) => { | |||
const handleRequest = (req, res) => { |
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.
@jonathanong "named arrow function" back
Current coverage is 100% (diff: 100%)@@ v2.x #805 diff @@
==================================
Files 4 4
Lines 418 420 +2
Methods 80 80
Messages 0 0
Branches 100 100
==================================
+ Hits 418 420 +2
Misses 0 0
Partials 0 0
|
named arrow function
|
o i c. i'm thinking maybe when we actually release koa v2, we only support node >= 8 since that's where |
@jonathanong Its a nice idea |
going to merge this and only support node 7.6+ :) |
cherry-pick #804