mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
fix: JS when Portfolio widget created without a toolbar
This commit is contained in:
parent
172150c6f0
commit
f6090cd7e5
1 changed files with 5 additions and 1 deletions
|
@ -491,7 +491,11 @@ $(window).on('load', function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get default filter (if any) for this instance
|
// Get default filter (if any) for this instance
|
||||||
let filterText = isoSection.querySelector('.default-project-filter').textContent || '*';
|
let defaultFilter = isoSection.querySelector('.default-project-filter');
|
||||||
|
let filterText = '*';
|
||||||
|
if (defaultFilter !== null) {
|
||||||
|
filterText = defaultFilter.textContent;
|
||||||
|
}
|
||||||
console.debug(`Default Isotope filter: ${filterText}`);
|
console.debug(`Default Isotope filter: ${filterText}`);
|
||||||
|
|
||||||
// Init Isotope instance once its images have loaded.
|
// Init Isotope instance once its images have loaded.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue