Skip to content

Commit e85ffb5

Browse files
committed
fix: apply pending code
I made a comparison between the branch main and stable32 and identified those diferences Signed-off-by: Vitor Mattos <[email protected]>
1 parent cbd5751 commit e85ffb5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

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)) {

0 commit comments

Comments
 (0)