Skip to content
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

refactor(middleware): update middleware/common to ES6 #3028

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

johnjbarton
Copy link
Contributor

No description provided.

@@ -117,7 +120,7 @@ var createServeFile = function (fs, directory, config) {
responseData = (transform && transform(data.toString())) || data

if (rangeHeader) {
var code = convertForRangeRequest()
const code = convertForRangeRequest()
Copy link
Contributor

@lusarz lusarz Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can update L122-L127 into response.writeHead(rangeHeader ? convertForRangeRequest() : 200).

Same with L97-L101

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

log.warn('404: ' + path)
response.writeHead(404)
return response.end('NOT FOUND')
}

var createServeFile = function (fs, directory, config) {
var cache = Object.create(null)
const createServeFile = function (fs, directory, config) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about function createServeFile (fs, directory, config) instead of const ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done (also others)

@johnjbarton johnjbarton merged commit c1a9567 into karma-runner:master Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants