diff --git a/assets/js/process.js b/assets/js/process.js index 8e36dbc69..3798ef345 100644 --- a/assets/js/process.js +++ b/assets/js/process.js @@ -18,9 +18,11 @@ if (typeof auth !== 'undefined') { viewsCollection.doc(id).onSnapshot(doc => { var data = doc.data(); if (data) { - toggleLoaders(node) node.innerText = numberWithCommas(data.views) + } else { + node.innerText = 0 } + toggleLoaders(node) }) } @@ -28,9 +30,12 @@ if (typeof auth !== 'undefined') { likesCollection.doc(id).onSnapshot(doc => { var data = doc.data(); if (data) { - toggleLoaders(node) node.innerText = numberWithCommas(data.likes) + } else { + node.innerText = 0 } + toggleLoaders(node) + }) } diff --git a/layouts/partials/meta/likes_button.html b/layouts/partials/meta/likes_button.html index edcf785e5..09c3c1593 100644 --- a/layouts/partials/meta/likes_button.html +++ b/layouts/partials/meta/likes_button.html @@ -1,10 +1,10 @@ - {{- /* Trim EOF */ -}} \ No newline at end of file diff --git a/package.json b/package.json index 0f9d53951..6adf8d62f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.47.0", + "version": "2.47.1", "description": "Blowfish theme for Hugo", "scripts": { "fullinstall": "npm run preinstall && npm install && npm run postinstall",