File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 () {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const slugfy = (val) =>
3232 . replace ( / - + $ / , '' )
3333
3434export 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 ) ) {
You can’t perform that action at this time.
0 commit comments