Skip to content

Commit 4f2536d

Browse files
authored
Merge pull request #6081 from LibreSign/fix/apply-pending-code-stable31
fix: apply pending code
2 parents 4b8b11e + 0d08b19 commit 4f2536d

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/Components/PreviewSignature/PreviewSignature.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default {
7070
}
7171
if (this.signRequestUuid !== '') {
7272
config.headers = {
73-
'LibreSign-sign-request-uuid': this.signRequestUuid,
73+
'libresign-sign-request-uuid': this.signRequestUuid,
7474
}
7575
}
7676
await axios(config)

src/Components/Signers/Signers.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default {
7070
},
7171
computed: {
7272
signers() {
73-
return this.filesStore.getFile()?.signers ?? []
73+
return this.filesStore.getFile().signers
7474
},
7575
sortableSigners: {
7676
get() {

src/store/files.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const slugfy = (val) =>
3232
.replace(/-+$/, '')
3333

3434
export const useFilesStore = function(...args) {
35+
const emptyFile = { signers: [] }
3536
const store = defineStore('files', {
3637
state: () => {
3738
return {
@@ -68,7 +69,7 @@ export const useFilesStore = function(...args) {
6869
if (typeof file === 'object') {
6970
return file
7071
}
71-
return this.files[this.selectedNodeId] ?? {}
72+
return this.files[this.selectedNodeId] || emptyFile
7273
},
7374
async flushSelectedFile() {
7475
const files = await this.getAllFiles({
@@ -222,6 +223,9 @@ export const useFilesStore = function(...args) {
222223
}
223224
}
224225
this.getFile().signers.push(signer)
226+
const selected = this.selectedNodeId
227+
this.selectFile(-1) // to force reactivity
228+
this.selectFile(selected) // to force reactivity
225229
},
226230
async deleteSigner(signer) {
227231
if (!isNaN(signer.signRequestId)) {

src/store/signatureElements.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const useSignatureElementsStore = function(...args) {
5454
}
5555
if (this.signRequestUuid !== '') {
5656
config.headers = {
57-
'LibreSign-sign-request-uuid': this.signRequestUuid,
57+
'libresign-sign-request-uuid': this.signRequestUuid,
5858
}
5959
}
6060
await axios(config)
@@ -98,7 +98,7 @@ export const useSignatureElementsStore = function(...args) {
9898
}
9999
if (this.signRequestUuid !== '') {
100100
config.headers = {
101-
'LibreSign-sign-request-uuid': this.signRequestUuid,
101+
'libresign-sign-request-uuid': this.signRequestUuid,
102102
}
103103
}
104104
await axios(config)
@@ -128,7 +128,7 @@ export const useSignatureElementsStore = function(...args) {
128128
}
129129
if (this.signRequestUuid !== '') {
130130
config.headers = {
131-
'LibreSign-sign-request-uuid': this.signRequestUuid,
131+
'libresign-sign-request-uuid': this.signRequestUuid,
132132
}
133133
}
134134
await axios(config)

0 commit comments

Comments
 (0)