Skip to content

Commit

Permalink
fix bug with creating emotion groups from legacy emotion sections
Browse files Browse the repository at this point in the history
  • Loading branch information
dartungar committed Feb 3, 2024
1 parent 04d05af commit 9cd2d19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "mood-tracker",
"name": "Mood Tracker",
"version": "1.1.0",
"version": "1.1.1",
"minAppVersion": "1.0.0",
"description": "Track your moods & emotions easily. Visualize tracked history and browse the past entries.",
"author": "dartungar",
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ export default class MoodTrackerPlugin extends Plugin {
if (legacyEmotionSections) {
const convertedLegacyEmotionSections = this.dataIntegrityService.legacyEmotionSectionsToEmotionGroups(legacyEmotionSections);
this.settings.emotionGroups.push(...convertedLegacyEmotionSections);
// @ts-expect-error
this.settings['emotionSections'] = null;
// @ts-expect-error
delete this.settings['emotionSections'];
}
this.settings.emotionGroups = this.emotionService.sortEmotionGroups(this.settings.emotionGroups);
this.dataIntegrityService.fillMissingIds(this.settings.emotionGroups);
Expand Down

0 comments on commit 9cd2d19

Please sign in to comment.