From 671b81cdc03d5d29644a3e2629fc647338d5205f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Sat, 23 Apr 2022 19:01:52 +0200 Subject: [PATCH] fixed variable name in the project.html template --- freshermeat/templates/project.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freshermeat/templates/project.html b/freshermeat/templates/project.html index 7cc4350..d5e3382 100644 --- a/freshermeat/templates/project.html +++ b/freshermeat/templates/project.html @@ -250,7 +250,7 @@
News
for (let k in filters) { url.searchParams.append(k, filters[k]); } fetch(url) .then(response => response.json()) - .then(elem => { + .then(result => { document.getElementById("project-news").innerHTML = ""; if (result.metadata.total == 0) { $('#project-news').append('No known news.') @@ -261,9 +261,9 @@
News
}) .map(function (release) { var cardHTML = newsTemplate({ - 'news_url': elem.link, - 'title': elem.title, - 'published': moment(elem.published).fromNow() + 'news_url': release.link, + 'title': release.title, + 'published': moment(release.published).fromNow() }); $('#project-news').append(cardHTML); });