Skip to content

Commit

Permalink
improvement base on issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodoudou committed May 13, 2018
1 parent a08b0e3 commit bb97ccd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dvr.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ class DVR {
}

channels (req) {
let hostname = `http://localhost:${this.express.serverPort}`
if (!_.isUndefined(req)) {
hostname = req.protocol + '://' + req.get('host')
}
const hostname = req.protocol + '://' + req.get('host')
const lines = []
_.forEach(this.server.channels, (line) => {
lines.push({
Expand Down

0 comments on commit bb97ccd

Please sign in to comment.