Skip to content

Commit c513cb4

Browse files
committed
refactor: simplify logic
Signed-off-by: Vitor Mattos <[email protected]>
1 parent f37b0dc commit c513cb4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/store/signMethods.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ export const useSignMethodsStore = defineStore('signMethods', {
5656
set(this.settings.password, 'hasSignatureFile', hasSignatureFile)
5757
},
5858
needCreatePassword() {
59-
return this.needSignWithPassword()
60-
&& (
61-
!Object.hasOwn(this.settings, 'password')
62-
|| !Object.hasOwn(this.settings.password, 'hasSignatureFile')
63-
|| !this.settings.password.hasSignatureFile
64-
)
59+
return this.needSignWithPassword() && !this.hasSignatureFile()
6560
},
6661
needSignWithPassword() {
6762
return Object.hasOwn(this.settings, 'password')

0 commit comments

Comments
 (0)