Skip to content

Commit 846ee53

Browse files
committed
fix: Make initFromState async in sign store
Convert initFromState() to async and await addFile() call to ensure proper initialization when loading file state. This maintains consistency with other addFile usage throughout the codebase. Signed-off-by: Vitor Mattos <[email protected]>
1 parent d69390d commit 846ee53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/store/sign.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const useSignStore = defineStore('sign', {
3333
state: () => ({ ...defaultState }),
3434

3535
actions: {
36-
initFromState() {
36+
async initFromState() {
3737
this.errors = loadState('libresign', 'errors', [])
3838

3939
const file = {
@@ -50,7 +50,7 @@ export const useSignStore = defineStore('sign', {
5050
}
5151
this.setFileToSign(file)
5252
const filesStore = useFilesStore()
53-
filesStore.addFile(file)
53+
await filesStore.addFile(file)
5454
filesStore.selectedNodeId = file.nodeId
5555
},
5656
setFileToSign(file) {

0 commit comments

Comments
 (0)