More front-end bug fixes

This commit is contained in:
Julien Nahum
2024-02-10 12:46:17 +01:00
parent 91911bc6e5
commit e5dc3f1bd4
8 changed files with 10 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ function initUpdatedForm() {
// Create a form.id watcher that updates working form
watch(form, (form) => {
if (form.value) {
if (form?.value) {
initUpdatedForm()
}
})

View File

@@ -157,7 +157,7 @@ const editForm = (form) => {
showEditFormModal.value = true
}
const onTagClick = (tag) => {
if (selectedTags.value.has(tag)) {
if (selectedTags?.value?.has(tag)) {
selectedTags.value.remove(tag)
} else {
selectedTags.value.add(tag)

View File

@@ -159,7 +159,7 @@ const saveChanges = () => {
// Update the workspace custom domain
customDomainsForm.put('/open/workspaces/' + workspace.value.id + '/custom-domains', {
data: {
custom_domains: customDomainsForm.custom_domains.split('\n')
custom_domains: customDomainsForm?.custom_domains?.split('\n')
.map(domain => domain ? domain.trim() : null)
.filter(domain => domain && domain.length > 0)
}
@@ -175,7 +175,7 @@ const saveChanges = () => {
const initCustomDomains = () => {
if (!workspace || !workspace.value.custom_domains) return
customDomainsForm.custom_domains = workspace.value.custom_domains.join('\n')
customDomainsForm.custom_domains = workspace.value?.custom_domains.join('\n')
}
const deleteWorkspace = (workspaceId) => {