Skip to content

Commit

Permalink
Fix eslint finally
Browse files Browse the repository at this point in the history
(and possibly importing JSON content?)
  • Loading branch information
yaaax committed Aug 16, 2024
1 parent fee1c1a commit 5dee6e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions confiture-web-app/src/components/ui/Tiptap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 5dee6e3

Please sign in to comment.