Skip to content

Commit

Permalink
Fix copy-pasta
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda authored and bp-cos committed Nov 30, 2023
1 parent aef7c09 commit 966251c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/preprints/index/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import RouterService from '@ember/routing/router-service';
import { inject as service } from '@ember/service';
import Theme from 'ember-osf-web/services/theme';
import captureException from 'ember-osf-web/utils/capture-exception';
import MetaTags, { HeadTagDef } from 'ember-osf-web/services/meta-tags';

/**
* Loads all disciplines and preprint providers to the index page
Expand All @@ -13,6 +14,9 @@ export default class Preprints extends Route {
@service store!: Store;
@service theme!: Theme;
@service router!: RouterService;
@service metaTags!: MetaTags;
headTags?: HeadTagDef[];


async model(params: { provider_id : string }) {
const provider_id = params.provider_id ? params.provider_id : 'osf';
Expand Down Expand Up @@ -61,13 +65,14 @@ export default class Preprints extends Route {
}
}

afterModel(model: PreprintProviderModel) {
if (model && model.assets && model.assets.favicon) {
afterModel(model: any) {
const {provider} = model;
if (provider && provider.assets && provider.assets.favicon) {
const headTags = [{
type: 'link',
attrs: {
rel: 'icon',
href: model.assets.favicon,
href: provider.assets.favicon,
},
}];
this.set('headTags', headTags);
Expand Down

0 comments on commit 966251c

Please sign in to comment.