Skip to content

Commit

Permalink
standard
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Jul 5, 2019
1 parent 9760271 commit b0723ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const http = require('http')
const https = require('https')
const once = require('once')
const querystring = require('querystring')
const url = require('url') // eslint-ignore-line
const url = require('url')

const isStream = o => o !== null && typeof o === 'object' && typeof o.pipe === 'function'

Expand All @@ -15,7 +15,7 @@ function simpleGet (opts, cb) {
cb = once(cb)

if (opts.url) {
const { hostname, port, protocol, auth, path } = url.parse(opts.url)
const { hostname, port, protocol, auth, path } = url.parse(opts.url) // eslint-disable-line node/no-deprecated-api
delete opts.url
if (!hostname && !port && !protocol && !auth) opts.path = path // Relative redirect
else Object.assign(opts, { hostname, port, protocol, auth, path }) // Absolute redirect
Expand Down

0 comments on commit b0723ff

Please sign in to comment.