diff --git a/confiture-web-app/src/components/ui/Tiptap.vue b/confiture-web-app/src/components/ui/Tiptap.vue index ed15a1d5..63293483 100644 --- a/confiture-web-app/src/components/ui/Tiptap.vue +++ b/confiture-web-app/src/components/ui/Tiptap.vue @@ -29,12 +29,14 @@ const props = defineProps(["content"]); const emit = defineEmits(["update:content"]); function getContent() { - let jsonContent = props.content; + let jsonContent; try { jsonContent = JSON.parse(props.content); - } finally { - return jsonContent; + } catch { + jsonContent = props.content; } + + return jsonContent; } const editor = useEditor({