Skip to content

Commit

Permalink
fix(cli): Skip writing to file if there is no output
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlee44 committed Jan 5, 2021
1 parent 4516f45 commit 50052a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export default function (options: Ical2JsonOptions) {
output = revert(JSON.parse(data) as IcalObject);
}

if (!output) continue;

const basename = path.basename(filePath, ext);
const dirname = path.dirname(filePath);
const compiledExt = isConvert ? '.json' : '.ics';
Expand Down

0 comments on commit 50052a5

Please sign in to comment.