From 4e78cbeb53bbdf7879aad2f662a500f7d6323356 Mon Sep 17 00:00:00 2001 From: kudakwashe siziva <9620622+kaysiz@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:01:16 +0200 Subject: [PATCH] Fix doi-language model issue (#824) * Fix doi-language model issue * Update doi-language to not use mixin --- app/components/doi-language.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/doi-language.js b/app/components/doi-language.js index aaae41e59..4f69e53b7 100644 --- a/app/components/doi-language.js +++ b/app/components/doi-language.js @@ -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);