Skip to content

Commit 45fd034

Browse files
kushthedudeiamareebjamal
authored andcommitted
fix: Defining computed countries property (#3779)
1 parent 9ed57c2 commit 45fd034

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app/components/forms/orders/order-form.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { run } from '@ember/runloop';
55
import { inject as service } from '@ember/service';
66
import FormMixin from 'open-event-frontend/mixins/form';
77
import moment from 'moment';
8-
import { countries } from 'open-event-frontend/utils/dictionary/demography';
98
import { groupBy, orderBy } from 'lodash-es';
109
import {
1110
compulsoryProtocolValidUrlPattern, validTwitterProfileUrlPattern, validFacebookProfileUrlPattern,
@@ -467,10 +466,6 @@ export default Component.extend(FormMixin, {
467466
return groupBy(this.fields.toArray(), field => field.get('form'));
468467
}),
469468

470-
countries: computed(function() {
471-
return orderBy(countries, 'name');
472-
}),
473-
474469
genders: orderBy(genders, 'name'),
475470

476471
actions: {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { countries } from 'open-event-frontend/utils/dictionary/demography';
2+
import Component from '@ember/component';
3+
import { computed } from '@ember/object';
4+
import { orderBy } from 'lodash-es';
5+
6+
export default Component.extend({
7+
countries: computed(function() {
8+
return orderBy(countries, 'name');
9+
})
10+
});

0 commit comments

Comments
 (0)