[www] articles router eslinted

This commit is contained in:
Roman Timashev committed 2017-09-19 13:46:35 +03:00
1 parent 6eb35930ea
commit 4d3fa1c064
1 file changed
+20 -20
+20 -20
View File
@@ -90,29 +90,29 @@ async function getArticleListComponent(path, page, pageSize) {
}
function getMeta(article) {
const types = [
ImageArtifactType.FACEBOOK,
ImageArtifactType.MEDIUM,
ImageArtifactType.BIG,
ImageArtifactType.ORIGIN,
]
const meta = {
const types = [
ImageArtifactType.FACEBOOK,
ImageArtifactType.MEDIUM,
ImageArtifactType.BIG,
ImageArtifactType.ORIGIN,
]
const meta = {
title: article.title,
}
if (article.preview) {
try {
const artifact = article.preview.findArtifact(types)
meta.image = artifact.url
meta.imageWidth = artifact.width
meta.imageHeight = artifact.height
} catch (error) {
meta.image = 'https://art.shlisselburg.org/entrance.jpg'
meta.imageWidth = 1200
meta.imageHeight = 630
}
}
return meta
if (article.preview) {
try {
const artifact = article.preview.findArtifact(types)
meta.image = artifact.url
meta.imageWidth = artifact.width
meta.imageHeight = artifact.height
} catch (error) {
meta.image = 'https://art.shlisselburg.org/entrance.jpg'
meta.imageWidth = 1200
meta.imageHeight = 630
}
}
return meta
}
function getArticles(pageSize) {