Skip to content

Commit

Permalink
fix(audio): only consider http urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jul 20, 2022
1 parent 858007d commit 85d24ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/metascraper-audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ module.exports = ({ getIframe = _getIframe, gotOpts, keyvOpts } = {}) => {
iframe.each(function () {
const src = $(this).attr('src')
const normalizedUrl = normalizeUrl(url, src)
if (normalizedUrl && srcs.indexOf(normalizedUrl) === -1) {
if (
typeof normalizedUrl === 'string' &&
normalizedUrl.startsWith('http') &&
srcs.indexOf(normalizedUrl) === -1
) {
srcs.push(normalizedUrl)
}
})
Expand Down

0 comments on commit 85d24ed

Please sign in to comment.