Skip to content

Commit

Permalink
Merge pull request #195 from KenEucker/develop
Browse files Browse the repository at this point in the history
fix(please): work
  • Loading branch information
KenEucker authored Sep 23, 2023
2 parents 38bd6c3 + 32a2bc6 commit d1c551c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export interface CommonData {
source?: AvailableApis | string
concise?: boolean
cached?: boolean
verbose?: boolean // TODO: add verbose logging
}

export type CommonPayloadData = CommonData
Expand Down Expand Up @@ -128,7 +127,6 @@ export type ApiOptions = RequireAtLeastOne<{
account?: string
concise?: boolean
cached?: boolean
verbose?: boolean
}>

/// **************************** Imgur API Objects ********************************** ///
Expand Down
4 changes: 2 additions & 2 deletions src/reddit/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export async function getBikeTagsFromRedditPosts(
const imageUrlIsRedditGallery = (p as any).is_gallery
const directImageLinks = []

if (p.selftext && p.selftext.length) {
if (p?.selftext?.length) {
postBody = selftext = p.selftext
} else if (p.media && p.media.oembed) {
} else if (p?.media?.oembed) {
/// Might be a single tag?
postBody = `${p.media.oembed.title} ${p.media.oembed.description}`
selftext = p.media.oembed.provider_url
Expand Down

0 comments on commit d1c551c

Please sign in to comment.