diff options
author | 2020-05-13 03:36:03 +0530 | |
---|---|---|
committer | 2020-05-12 22:06:03 +0000 | |
commit | 7d30372a631033fb23611f5ab195491cc8a82bda (patch) | |
tree | 817e98737b384b568157bd1f3fb525af23cd6df7 /src/components/auth/Locked.js | |
parent | Review GitHub issues/pull requests templates (#732) (diff) | |
download | ferdium-app-7d30372a631033fb23611f5ab195491cc8a82bda.tar.gz ferdium-app-7d30372a631033fb23611f5ab195491cc8a82bda.tar.zst ferdium-app-7d30372a631033fb23611f5ab195491cc8a82bda.zip |
Fix crash when using Password Lock with TouchID API unavailable (#737)
Diffstat (limited to 'src/components/auth/Locked.js')
-rw-r--r-- | src/components/auth/Locked.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/auth/Locked.js b/src/components/auth/Locked.js index 6142e78c6..c5e8a5aad 100644 --- a/src/components/auth/Locked.js +++ b/src/components/auth/Locked.js | |||
@@ -8,6 +8,7 @@ import Form from '../../lib/Form'; | |||
8 | import Input from '../ui/Input'; | 8 | import Input from '../ui/Input'; |
9 | import Button from '../ui/Button'; | 9 | import Button from '../ui/Button'; |
10 | import Infobox from '../ui/Infobox'; | 10 | import Infobox from '../ui/Infobox'; |
11 | import { isMac } from '../../environment'; | ||
11 | 12 | ||
12 | import { globalError as globalErrorPropType } from '../../prop-types'; | 13 | import { globalError as globalErrorPropType } from '../../prop-types'; |
13 | 14 | ||
@@ -100,7 +101,7 @@ export default @observer class Locked extends Component { | |||
100 | useTouchIdToUnlock, | 101 | useTouchIdToUnlock, |
101 | } = this.props; | 102 | } = this.props; |
102 | 103 | ||
103 | const touchIdEnabled = useTouchIdToUnlock && systemPreferences.canPromptTouchID(); | 104 | const touchIdEnabled = isMac ? (useTouchIdToUnlock && systemPreferences.canPromptTouchID()) : false; |
104 | const submitButtonLabel = touchIdEnabled ? intl.formatMessage(messages.unlockWithPassword) : intl.formatMessage(messages.submitButtonLabel); | 105 | const submitButtonLabel = touchIdEnabled ? intl.formatMessage(messages.unlockWithPassword) : intl.formatMessage(messages.submitButtonLabel); |
105 | 106 | ||
106 | return ( | 107 | return ( |