feat(Elife): Catch errors from date formatting
@@ -6,12 +6,11 @@ import * as socialSharers from './lib/socialSharers'
import * as references from './lib/references'
ready((): void => {
- dateFormatter.format(first(':--datePublished'))
-
const articleTitle = dataProvider.getArticleTitle()
downloads.build(articleTitle, dataProvider.getArticleId())
try {
+ dateFormatter.format(first(':--datePublished'))
socialSharers.build(articleTitle, dataProvider.getArticleDoi())
} catch (e) {
console.error(e)
