Skip to content

Commit

Permalink
Fix template upgrade script on settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
Filippo committed Aug 6, 2022
1 parent b916f60 commit 1d40319
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ionic/src/pages/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ export class SettingsPage implements OnInit, OnDestroy {
// almost duplicate code on app.component.ts
try {
const data = this.electronProvider.fsReadFileSync(filePaths[0], { encoding: 'utf-8' });
this.addOutputTemplate(JSON.parse(data));
const templateObj = JSON.parse(data);
const template = this.utils.upgradeTemplate(templateObj, templateObj.version);
this.addOutputTemplate(template);
} catch {
const path = this.electronProvider.path;
this.alertCtrl.create({
Expand Down

0 comments on commit 1d40319

Please sign in to comment.