Skip to content

Commit

Permalink
ran prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Sep 25, 2024
1 parent 7fa2d24 commit 3d229ce
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions addon/components/locale-selector-tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { debug } from '@ember/debug';
import { task } from 'ember-concurrency-decorators';
import calculatePosition from 'ember-basic-dropdown/utils/calculate-position';

Expand Down Expand Up @@ -94,12 +95,16 @@ export default class LocaleSelectorTrayComponent extends Component {
* @generator
*/
@task *loadAvailableCountries() {
this.countries = yield this.fetch.get(
'lookup/countries',
{ columns: ['name', 'cca2', 'flag', 'emoji', 'languages'] },
{ fromCache: true, expirationInterval: 1, expirationIntervalUnit: 'week' }
);
this.availableLocales = this._createAvailableLocaleMap();
try {
this.countries = yield this.fetch.get(
'lookup/countries',
{ columns: ['name', 'cca2', 'flag', 'emoji', 'languages'] },
{ fromCache: true, expirationInterval: 1, expirationIntervalUnit: 'week' }
);
this.availableLocales = this._createAvailableLocaleMap();
} catch (error) {
debug(`Locale Error: ${error.message}`);
}
}

/**
Expand Down

0 comments on commit 3d229ce

Please sign in to comment.