« get me outta code hell

filter out no dateAdded in respective listing - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-06-13 22:55:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-06-13 22:55:54 -0300
commit7b61b2cbf5eca5f31ec227bdfc98fbf8f6ec9b6a (patch)
tree575b4ff9f6b1d3fa9f949d32ccfa78036fb418b8
parente5334b6907cc59d88df948020addbc9fc3bf0c82 (diff)
filter out no dateAdded in respective listing
-rw-r--r--src/listing-spec.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index 1c1dbd5e..497f9845 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -81,7 +81,7 @@ const listingSpec = [
         stringsKey: 'listAlbums.byDateAdded',
 
         data({wikiData}) {
-            return chunkByProperties(wikiData.albumData.slice().sort((a, b) => {
+            return chunkByProperties(wikiData.albumData.filter(a => a.dateAddedToWiki).sort((a, b) => {
                 if (a.dateAddedToWiki < b.dateAddedToWiki) return -1;
                 if (a.dateAddedToWiki > b.dateAddedToWiki) return 1;
             }), ['dateAddedToWiki']);