Skip to content

Commit

Permalink
typo and format
Browse files Browse the repository at this point in the history
  • Loading branch information
Edit-Mr authored Nov 9, 2023
1 parent 2683439 commit 142b001
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@ rl.on("line", line => {
activities.push(currentActivity);
} else if (line.startsWith("*")) {
const value = line.substring(1).trim();
if (!currentActivity.description) {
currentActivity.description = value;
} else if (!currentActivity.date) {
currentActivity.date = value;
} else if (!currentActivity.location) {
currentActivity.location = value;
} else if (!currentActivity.price) {
currentActivity.price = value;
} else if (!currentActivity.image) {
currentActivity.price = value;
if (!currentActivity.description) currentActivity.description = value;
else if (!currentActivity.date) currentActivity.date = value;
else if (!currentActivity.location) currentActivity.location = value;
else if (!currentActivity.price) currentActivity.price = value;
else if (!currentActivity.image) currentActivity.image = value;
}
}
});
Expand Down

0 comments on commit 142b001

Please sign in to comment.