| @@ -488,9 +488,12 @@ | ||
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | // Initialize on DOMContentLoaded |
| 492 | - new WDKListingSearch('#wdk-listing-search', '.wdk-search-results', document.getElementById('wdk-listing-search').getAttribute('idexecuted')); | |
| 492 | + const wdkListingSearchElem = document.getElementById('wdk-listing-search'); | |
| 493 | + if (wdkListingSearchElem) { | |
| 494 | + new WDKListingSearch('#wdk-listing-search', '.wdk-search-results', wdkListingSearchElem.getAttribute('idexecuted')); | |
| 495 | + } | |
| 493 | 496 | }); |
| 494 | 497 | |
| 495 | 498 | |
| 496 | 499 | |