Skip to content

Commit

Permalink
fix: get protocol based on URL schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Dec 21, 2019
1 parent 61cd5d3 commit dce1863
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/metascraper-media-provider/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const {

const createGetMedia = require('./get-media')

const isProtocol = value => ({ protocol, url }) =>
protocol ? eq(protocol, value) : protocolFn(url, value)
const isProtocol = value => ({ url }) => eq(protocolFn(url), value)

const isHttps = isProtocol('https')

Expand Down

0 comments on commit dce1863

Please sign in to comment.