Skip to content

Commit

Permalink
Add fetch guard for SchemeNote
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jan 3, 2025
1 parent c01944f commit e8f9a00
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import { useToast } from "primevue/usetoast";
import MetaStringViewer from "@/arches_lingo/components/generic/MetaStringViewer.vue";
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue";
import { deleteSchemeNoteTile, fetchSchemeNotes } from "@/arches_lingo/api.ts";
import { ERROR, OPEN_EDITOR, VIEW, EDIT } from "@/arches_lingo/constants.ts";
import {
ERROR,
NEW,
OPEN_EDITOR,
VIEW,
EDIT,
} from "@/arches_lingo/constants.ts";
import type {
DataComponentMode,
MetaStringText,
Expand Down Expand Up @@ -48,6 +54,9 @@ onMounted(() => {
});
async function getSectionValue() {
if (route.params.id === NEW) {
return;
}
try {
const result = await fetchSchemeNotes(route.params.id as string);
schemeInstance.value = {
Expand Down

0 comments on commit e8f9a00

Please sign in to comment.