diff --git a/client/pages/home.comp.html b/client/pages/home.comp.html
index 6dbda6d..0ecdf1a 100644
--- a/client/pages/home.comp.html
+++ b/client/pages/home.comp.html
@@ -14,6 +14,7 @@
+ Loading articles ...
@@ -21,6 +22,7 @@
diff --git a/client/pages/home.comp.js b/client/pages/home.comp.js
index 8696b7c..bff1f24 100644
--- a/client/pages/home.comp.js
+++ b/client/pages/home.comp.js
@@ -43,6 +43,7 @@ export class HomeComponent extends HTMLElement {
fetch('https://conduit.productionready.io/api/articles').then(function (response) {
return response.json();
}).then(r => {
+ this.cleanGlobalFeed();
r.articles.forEach(article => {
this.generateArticle(article, globalFeed);
});
@@ -66,6 +67,9 @@ export class HomeComponent extends HTMLElement {
fetch('https://conduit.productionready.io/api/tags').then(function (response) {
return response.json();
}).then(r => {
+ while (tagList.firstChild) {
+ tagList.removeChild(tagList.firstChild);
+ }
r.tags.forEach(tag => {
const tagEl = this.createNewTagElement(tag);
tagEl.addEventListener('click', () => {
diff --git a/package.json b/package.json
index ebc3cc9..d408cf3 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"license": "MIT",
"scripts": {
"start": "webpack-dev-server",
- "build": "webpack --config webpack.config.prod.js",
+ "build": "rm -rf dist && webpack --config webpack.config.prod.js",
"prod": "cp serve.js dist/serve.js && node serve.js"
},
"dependencies": {