From 0fbb3fb02bdc852c82d10f07222418c21531a3d0 Mon Sep 17 00:00:00 2001 From: Erick Guan Date: Fri, 11 Nov 2016 09:16:29 +0100 Subject: [PATCH] FIX: open login modal fails because of missing parameters --- .../javascripts/discourse/components/login-buttons.js.es6 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/components/login-buttons.js.es6 b/app/assets/javascripts/discourse/components/login-buttons.js.es6 index ccaabff239f..4c68d1740f2 100644 --- a/app/assets/javascripts/discourse/components/login-buttons.js.es6 +++ b/app/assets/javascripts/discourse/components/login-buttons.js.es6 @@ -1,4 +1,5 @@ import { findAll } from 'discourse/models/login-method'; +import computed from 'ember-addons/ember-computed-decorators'; export default Ember.Component.extend({ elementId: 'login-buttons', @@ -6,9 +7,10 @@ export default Ember.Component.extend({ hidden: Ember.computed.equal('buttons.length', 0), - buttons: function() { - return findAll(this.siteSettings); - }.property(), + @computed + buttons() { + return findAll(this.siteSettings, this.capabilities, this.site.isMobileDevice); + }, actions: { externalLogin: function(provider) {