Skip to content

Commit e5dc3f1

Browse files
committed
More front-end bug fixes
1 parent 91911bc commit e5dc3f1

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

client/components/forms/PhoneInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default {
138138
if(this.compVal === null){
139139
return;
140140
}
141-
if (!this.compVal.startsWith('+')) {
141+
if (!this.compVal?.startsWith('+')) {
142142
this.selectedCountryCode = this.getCountryBy(this.compVal.substring(2, 0))
143143
}
144144

client/components/forms/SelectInput.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<template v-if="multiple">
3333
<div class="flex items-center truncate mr-6">
3434
<span class="truncate">
35-
{{ selectedValues.join(', ') }}
35+
{{ selectedValues?.join(', ') }}
3636
</span>
3737
</div>
3838
</template>
@@ -122,6 +122,7 @@ export default {
122122
return null
123123
},
124124
updateModelValue(newValues){
125+
if (newValues === null) newValues = []
125126
this.selectedValues = newValues
126127
},
127128
updateOptions (newItem) {

client/components/forms/SignatureInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default {
5353
if (this.disabled) {
5454
this.$refs.signaturePad.clearSignature()
5555
} else {
56-
const { isEmpty, data } = this.$refs.signaturePad.saveSignature()
56+
const { isEmpty, data } = this.$refs.signaturePad?.saveSignature()
5757
this.form[this.name] = (!isEmpty && data) ? data : null
5858
}
5959
}

client/components/global/WorkspaceDropdown.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<template v-for="worksp in workspaces" :key="worksp.id">
2424
<a href="#"
2525
class="px-4 py-2 text-md text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
26-
:class="{'bg-blue-100 dark:bg-blue-900':workspace.id === worksp.id}" @click.prevent="switchWorkspace(worksp)"
26+
:class="{'bg-blue-100 dark:bg-blue-900':workspace?.id === worksp?.id}" @click.prevent="switchWorkspace(worksp)"
2727
>
2828
<div class="rounded-full h-8 w-8 flex-shrink-0" role="button">
2929
<img v-if="isUrl(worksp.icon)"

client/components/open/forms/OpenForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</open-form-button>
4848

4949
<slot v-if="isLastPage" name="submit-btn" :submitForm="submitForm" />
50-
<open-form-button v-else native-type="button" :color="form.color" :theme="theme" class="mt-2 px-8 mx-1"
50+
<open-form-button v-else-if="currentFieldsPageBreak" native-type="button" :color="form.color" :theme="theme" class="mt-2 px-8 mx-1"
5151
@click.stop="nextPage"
5252
>
5353
{{ currentFieldsPageBreak.next_btn_text }}

client/pages/forms/[slug]/edit.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function initUpdatedForm() {
5656
5757
// Create a form.id watcher that updates working form
5858
watch(form, (form) => {
59-
if (form.value) {
59+
if (form?.value) {
6060
initUpdatedForm()
6161
}
6262
})

client/pages/home.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const editForm = (form) => {
157157
showEditFormModal.value = true
158158
}
159159
const onTagClick = (tag) => {
160-
if (selectedTags.value.has(tag)) {
160+
if (selectedTags?.value?.has(tag)) {
161161
selectedTags.value.remove(tag)
162162
} else {
163163
selectedTags.value.add(tag)

client/pages/settings/workspace.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const saveChanges = () => {
159159
// Update the workspace custom domain
160160
customDomainsForm.put('/open/workspaces/' + workspace.value.id + '/custom-domains', {
161161
data: {
162-
custom_domains: customDomainsForm.custom_domains.split('\n')
162+
custom_domains: customDomainsForm?.custom_domains?.split('\n')
163163
.map(domain => domain ? domain.trim() : null)
164164
.filter(domain => domain && domain.length > 0)
165165
}
@@ -175,7 +175,7 @@ const saveChanges = () => {
175175
176176
const initCustomDomains = () => {
177177
if (!workspace || !workspace.value.custom_domains) return
178-
customDomainsForm.custom_domains = workspace.value.custom_domains.join('\n')
178+
customDomainsForm.custom_domains = workspace.value?.custom_domains.join('\n')
179179
}
180180
181181
const deleteWorkspace = (workspaceId) => {

0 commit comments

Comments
 (0)