Skip to content
Snippets Groups Projects
Commit c732a803 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #6591 from RocketChat/hotfix/one-password-not-defined

Fix recently introduced bug: OnePassword not defined
parents 413ac7a1 cb2e3d60
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ Template.loginForm.helpers({
return RocketChat.settings.get('Accounts_PasswordPlaceholder') || t('Password');
},
hasOnePassword() {
return (OnePassword && OnePassword.findLoginForUrl) && (device && device.platform && device.platform.toLocaleLowerCase() === 'ios');
return typeof OnePassword !== 'undefined' && OnePassword.findLoginForUrl && typeof device !== 'undefined' && device.platform && device.platform.toLocaleLowerCase() === 'ios';
}
});
......@@ -151,7 +151,7 @@ Template.loginForm.events({
return RocketChat.callbacks.run('loginPageStateChange', Template.instance().state.get());
},
'click .one-passsword'() {
if (OnePassword && OnePassword.findLoginForUrl) {
if (typeof OnePassword === 'undefined' || OnePassword.findLoginForUrl == null) {
return;
}
const succesCallback = function(credentials) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment