From 81c494b91a45a9fee95605be4a0b0524aed0a277 Mon Sep 17 00:00:00 2001 From: Nicolas Lepage <19571875+nlepage@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:04:18 +0200 Subject: [PATCH] fix: hard refresh crashed when on skill/challenge detail --- .../authenticated/competence/prototypes/single.js | 5 ++++- .../controllers/authenticated/competence/skills/single.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pix-editor/app/controllers/authenticated/competence/prototypes/single.js b/pix-editor/app/controllers/authenticated/competence/prototypes/single.js index 77a0a3a46..5c7f691e1 100644 --- a/pix-editor/app/controllers/authenticated/competence/prototypes/single.js +++ b/pix-editor/app/controllers/authenticated/competence/prototypes/single.js @@ -28,7 +28,6 @@ export default class SingleController extends Controller { @service currentData; @service filePath; @service intl; - defaultSaveChangelog = this.intl.t('prototype.changelog.update-message'); @service loader; @service notify; @service router; @@ -121,6 +120,10 @@ export default class SingleController extends Controller { return this.challenge.get('isPrototype') ? 'authenticated.competence.prototypes.localized' : 'authenticated.competence.prototypes.single.alternatives.localized'; } + get defaultSaveChangelog() { + return this.intl.t('prototype.changelog.update-message'); + } + @action getLocalizedChallengeLinkModels(localizedChallenge) { return [this.challenge.get('id'), localizedChallenge.get('id')]; diff --git a/pix-editor/app/controllers/authenticated/competence/skills/single.js b/pix-editor/app/controllers/authenticated/competence/skills/single.js index 05eb0fba6..980c06389 100644 --- a/pix-editor/app/controllers/authenticated/competence/skills/single.js +++ b/pix-editor/app/controllers/authenticated/competence/skills/single.js @@ -8,7 +8,6 @@ export default class SingleController extends Controller { wasMaximized = false; changelogCallback = null; - defaultSaveChangelog = this.intl.t('skill.changelog.update-message'); @tracked edition = false; @tracked displaySelectLocation = false; @@ -71,6 +70,10 @@ export default class SingleController extends Controller { return `${this.config.airtableUrl}${this.config.airtableBase}/${this.config.tableSkills}/${this.skill.id}`; } + get defaultSaveChangelog() { + return this.intl.t('skill.changelog.update-message'); + } + @action maximize() { this.parentController.maximizeLeft(true);