Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 6 insertions, 4 deletions
-rw-r--r--website/themes/hugo-clarity/assets/js/index.js10
diff --git a/website/themes/hugo-clarity/assets/js/index.js b/website/themes/hugo-clarity/assets/js/index.js
index 16e12f8..b2e8152 100644
--- a/website/themes/hugo-clarity/assets/js/index.js
+++ b/website/themes/hugo-clarity/assets/js/index.js
@@ -235,10 +235,12 @@ function fileClosure(){
const modifiers = [':left', ':right'];
const altArr = alt.split('::').map(x => x.trim())
- altArr[1]?.split(' ').filter(Boolean).forEach(cls =>{
- pushClass(image, cls);
- alt = altArr[0]
- })
+ if (altArr[1] !== undefined) {
+ altArr[1].split(' ').filter(Boolean).forEach((cls) =>{
+ pushClass(image, cls);
+ alt = altArr[0]
+ })
+ }
modifiers.forEach(function(modifier){
const canModify = alt.includes(modifier);