« get me outta code hell

use [html.onlyIfContent] where it makes sense - 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-11-21 21:54:18 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-11-21 21:55:16 -0400
commita69bdd2c6c02286f63ce19812ed42c4576423c3d (patch)
treef319550636da18ff6ec561fc5cebf47d170f56d9
parentba2751eae00c4bcf10403edbd549ca70dc316cab (diff)
use [html.onlyIfContent] where it makes sense
which was only like one place lol
-rw-r--r--src/page/homepage.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/page/homepage.js b/src/page/homepage.js
index c15c969a..7295ba09 100644
--- a/src/page/homepage.js
+++ b/src/page/homepage.js
@@ -91,11 +91,14 @@ export function writeTargetless({wikiData}) {
                           lazy: i > 0,
                         })),
 
-                      !empty(entry.actionLinks) &&
-                        html.tag('div', {class: 'grid-actions'},
-                          entry.actionLinks.map(action =>
-                            transformInline(action)
-                              .replace('<a', '<a class="box grid-item"'))),
+                      html.tag('div',
+                        {
+                          [html.onlyIfContent]: true,
+                          class: 'grid-actions',
+                        },
+                        entry.actionLinks?.map(action =>
+                          transformInline(action)
+                            .replace('<a', '<a class="box grid-item"'))),
                     ]),
                 ]))),
         ]),