Skip to content

Commit

Permalink
fix: text content loss
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Lord committed Jul 9, 2024
1 parent 5874614 commit 3ed9e8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/views/Clip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ async function createIfNotExist() {
try {
await axios
.post<Response<ClipData>>(`/note/${name}`, {})
.then(processFetchedContent)
.then((resp) => {
processFetchedContent(resp, { include_slots: ["version"] })
})
is_new.value = false
} catch (e: any) {
console.log(e)
Expand Down Expand Up @@ -1449,7 +1451,9 @@ async function toggleReadonlyUrl() {
.put<Response<ClipData>>(`/note/${name}`, {
enable_readonly: !hasReadonlyName.value,
})
.then(processFetchedContent)
.then((resp) => {
processFetchedContent(resp, { include_slots: [] })
})
} catch (e: any) {
console.log(e)
}
Expand Down

0 comments on commit 3ed9e8a

Please sign in to comment.