diff --git a/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee b/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee index aa1f9f9b..71afdacc 100644 --- a/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee +++ b/app/assets/javascripts/supplier/app/components/suppliers-switcher.js.coffee @@ -1,7 +1,8 @@ App.SuppliersSwitcherComponent = Ember.Component.extend classNames: ['suppliers-switcher-container'] suppliers: (-> @get('targetObject.store').all 'supplier').property() - other_suppliers: ( -> @get('suppliers').rejectBy 'id', @get('targetObject.controllers.application.supplier.id')).property('suppliers.@each') + other_suppliers: ( -> @get('suppliers').rejectBy 'id', @get('current_supplier.id')).property('suppliers.@each') + current_supplier: Ember.computed.alias 'targetObject.controllers.application.supplier' actions: switchTo: (locale)-> setLocale locale