Skip to content

Commit

Permalink
Delete useless if
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Aug 14, 2022
1 parent a0463ad commit 979ab21
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/upload-media.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import Twitter from 'twitter-api-v2'
import {isString} from 'util'
import * as fs from 'fs'
import * as core from '@actions/core'

export async function uploadMedia(mediaPaths: string[]): Promise<string[]> {
core.debug(JSON.stringify(mediaPaths))
for (const path of mediaPaths) {
if (!isString(path)) {
throw new Error('media path not a string')
}
if (!fs.existsSync(path)) {
throw new Error(`${path} not exists`)
}
Expand Down

0 comments on commit 979ab21

Please sign in to comment.