FIX: Don't require device capabilities when calculating login methods

This commit is contained in:
David Taylor 2018-08-08 10:37:25 +01:00
parent 575d9e0b1a
commit d4d5088324
2 changed files with 5 additions and 8 deletions

View File

@ -34,13 +34,7 @@ export default Ember.Controller.extend({
@computed
displayOAuthWarning() {
return (
findAll(
this.siteSettings,
getOwner(this).lookup("capabilities:main"),
this.site.isMobileDevice
).length > 0
);
return findAll().length > 0;
},
toggleSecondFactor(enable) {

View File

@ -86,7 +86,10 @@ export function findAll(siteSettings, capabilities, isMobileDevice) {
});
// On Mobile, Android or iOS always go with full screen
if (isMobileDevice || capabilities.isIOS || capabilities.isAndroid) {
if (
isMobileDevice ||
(capabilities && (capabilities.isIOS || capabilities.isAndroid))
) {
methods.forEach(m => m.set("full_screen_login", true));
}