Skip to content

Commit

Permalink
Fix doi-language model issue (#824)
Browse files Browse the repository at this point in the history
* Fix doi-language model issue

* Update doi-language to not use mixin
  • Loading branch information
kaysiz authored Oct 16, 2023
1 parent 2d4c384 commit 4e78cbe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/components/doi-language.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import Component from '@ember/component';
import { computed } from '@ember/object';
import ISO6391 from 'iso-639-1';
import { isBlank } from '@ember/utils';
import LanguageComputedMixin from '../mixins/language-computed';

const languageList = ISO6391.getAllNames();

export default Component.extend(LanguageComputedMixin, {
export default Component.extend({
languageList,
languages: languageList,
language: computed('model.language', function() {
return ISO6391.getName(this.get('model.language')) !== '' ? ISO6391.getName(this.get('model.language')) : this.get('model.language');
}),

init(...args) {
this._super(...args);
Expand Down

0 comments on commit 4e78cbe

Please sign in to comment.