Skip to content
Snippets Groups Projects
Commit cb2e3d60 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Fix recently introduced bug: OnePassword not defined

parent f4a0bde8
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ Template.loginForm.helpers({ ...@@ -54,7 +54,7 @@ Template.loginForm.helpers({
return RocketChat.settings.get('Accounts_PasswordPlaceholder') || t('Password'); return RocketChat.settings.get('Accounts_PasswordPlaceholder') || t('Password');
}, },
hasOnePassword() { 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({ ...@@ -151,7 +151,7 @@ Template.loginForm.events({
return RocketChat.callbacks.run('loginPageStateChange', Template.instance().state.get()); return RocketChat.callbacks.run('loginPageStateChange', Template.instance().state.get());
}, },
'click .one-passsword'() { 'click .one-passsword'() {
if (OnePassword && OnePassword.findLoginForUrl) { if (typeof OnePassword === 'undefined' || OnePassword.findLoginForUrl == null) {
return; return;
} }
const succesCallback = function(credentials) { 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