Skip to content

Commit

Permalink
fix error with default asset location
Browse files Browse the repository at this point in the history
  • Loading branch information
kbravh committed Nov 7, 2021
1 parent a6d1fcc commit db91b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const createMediaElements = (
return media
.map((medium: Media) => {
if (settings.downloadAssets) {
const assetLocation = settings.assetLocation ?? 'assets'
const assetLocation = settings.assetLocation || 'assets'
const filepath = normalizePath(
`${assetLocation}/${medium.media_key}.jpg`
)
Expand Down Expand Up @@ -194,7 +194,7 @@ export const buildMarkdown = async (
'---',
]

const assetPath = plugin.settings.assetLocation ?? 'assets'
const assetPath = plugin.settings.assetLocation || 'assets'
let markdown = [
`![${user.username}](${
plugin.settings.downloadAssets
Expand Down Expand Up @@ -226,7 +226,7 @@ export const buildMarkdown = async (
app,
downloadManager,
tweet,
plugin.settings.assetLocation ?? 'assets'
plugin.settings.assetLocation || 'assets'
)
}

Expand Down

0 comments on commit db91b49

Please sign in to comment.