From d8f590257a0e74f5e5535515865887f2471684fe Mon Sep 17 00:00:00 2001 From: Michael Bauer <michael-bauer@posteo.de> Date: Mon, 5 Feb 2024 18:15:05 +0100 Subject: [PATCH] Do not mutate topic if unchanged --- .../components/documentation/LessonSummary.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue b/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue index 829de58b1..14460aa83 100644 --- a/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue +++ b/aleksis/apps/alsijil/frontend/components/documentation/LessonSummary.vue @@ -63,10 +63,13 @@ export default { }, methods: { saveTopic() { - this.createOrPatch([{ - id: this.documentation.id, - topic: this.topic, - }]); + if (this.topic) { + this.createOrPatch([{ + id: this.documentation.id, + topic: this.topic, + }]); + this.topic = ""; + } }, truncate(str) { return str ? -- GitLab