Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] don't reset update time when no update was written to db #6035

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/card/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
id="description-preview"
dir="auto"
@click="clickedPreview"
v-html="renderedDescription" />

Check warning on line 60 in src/components/card/Description.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'v-html' directive can lead to XSS attack
<p v-else-if="!descriptionEditing" class="placeholder" @click="showEditor()">
{{ t('deck', 'Write a description …') }}
</p>
Expand Down Expand Up @@ -204,7 +204,6 @@
},
onUpdate: ({ markdown }) => {
if (this.description === markdown) {
this.descriptionLastEdit = 0
return
}
this.description = markdown
Expand Down Expand Up @@ -300,7 +299,9 @@
return
}
this.descriptionSaving = true
await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description })
if (this.card.id !== undefined) {
await this.$store.dispatch('updateCardDesc', { ...this.card, description: this.description })
}
this.$emit('change', this.description)
this.descriptionLastEdit = 0
this.descriptionSaving = false
Expand Down
Loading