fixed infinite loading on new application

This commit is contained in:
2025-10-20 10:07:59 -04:00
parent 6d4a29e0c3
commit a67a66db1b

View File

@@ -21,16 +21,16 @@ onMounted(async () => {
try { try {
//get app ID from URL param //get app ID from URL param
const router = useRoute(); const router = useRoute();
const appIDRaw = router.params.id.toString(); const appIDRaw = router.params.id;
const raw = await loadApplication(appIDRaw); if (appIDRaw === undefined) {
console.log(raw);
if (raw === null) {
//new app //new app
appData.value = null appData.value = null
readOnly.value = false; readOnly.value = false;
newApp.value = true; newApp.value = true;
} else { } else {
//load app //load app
const raw = await loadApplication(appIDRaw.toString());
const data = raw.application; const data = raw.application;
appID.value = data.id; appID.value = data.id;