Skip to content

Commit ae693e3

Browse files
committed
fix: use undefined
1 parent a5c2896 commit ae693e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/metascraper-media-provider/src/get-media/provider/generic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = ({ tunnel, onError, userAgent, cacheDir }) => {
3232
return async url => {
3333
let data = {}
3434
do {
35-
const agent = retry.val() && getAgent(tunnel)
35+
const agent = retry.val() ? getAgent(tunnel) : undefined
3636
const flags = getFlags({ url, agent, userAgent, cacheDir })
3737
debug(`getInfo retry=${retry.val()} url=${url} flags=${flags.join(' ')}`)
3838
try {

packages/metascraper-media-provider/src/get-media/provider/twitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const createGuestToken = ({ userAgent, tunnel }) => {
2222
let token
2323

2424
do {
25-
const agent = retry.val() && getAgent(tunnel)
25+
const agent = retry.val() ? getAgent(tunnel) : undefined
2626
debug(
2727
`guestToken retry=${retry.val()} agent=${
2828
agent ? proxyUri(agent) : false

0 commit comments

Comments
 (0)