diff options
| Commit | 3fb170dda610ac79ef411e8dec593419a6c707cb (patch) | |
|---|---|---|
| Author | 2020-08-18 15:39:25 +0300 | |
| Committer | 2020-08-18 15:39:25 +0300 | |
| Files | 2be391b673338b0f975258f6b1550325f9913fb8 /website | |
| IPL-3fb170dda610ac79ef411e8dec593419a6c707cb.tar IPL-3fb170dda610ac79ef411e8dec593419a6c707cb.tar.gz IPL-3fb170dda610ac79ef411e8dec593419a6c707cb.zip | ||
| Parent | 6c9281cab5acf18933b636fd8e5214ed8d7f4918 (diff) | |
Fix loading the JavaScript of the clarity theme
1 files changed, 6 insertions, 4 deletions
| -rw-r--r-- | website/themes/hugo-clarity/assets/js/index.js | 10 |
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); |
