Skip to content

Commit

Permalink
fixed getPathFromArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
GachiLord committed Jul 27, 2023
1 parent 6c644d0 commit 294d77f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/desktop/main/getPathFromArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const path = require('path')
*/
module.exports = function(args){
for (const arg of args){
if (typeof arg !== 'string') throw new TypeError('args must be string[]')
if (typeof arg !== 'string') continue

const ext = path.extname(arg).slice(1)
if (['png', 'pdf', 'zip'].includes(ext)) return arg
Expand Down

0 comments on commit 294d77f

Please sign in to comment.