diff --git a/source/php/Modules/AboutMe/AboutMe.php b/source/php/Modules/AboutMe/AboutMe.php index 8893520..4fa7cab 100644 --- a/source/php/Modules/AboutMe/AboutMe.php +++ b/source/php/Modules/AboutMe/AboutMe.php @@ -62,15 +62,19 @@ public function template(): string public function script() { + if (!$this->hasModule()) { + return; + } + wp_enqueue_script( - 'gdi-modularity-about-me-js', - GDI_ABOUT_ME_URL . '/dist/' . CacheBust::name('js/gdi-modularity-about-me.js'), - null + 'gdi-modularity-about-me-js', + GDI_ABOUT_ME_URL . '/dist/' . CacheBust::name('js/gdi-modularity-about-me.js'), + null ); wp_enqueue_style( - 'gdi-modularity-about-me-css', - GDI_ABOUT_ME_URL . '/dist/' . CacheBust::name('js/gdi-modularity-about-me.css'), - null + 'gdi-modularity-about-me-css', + GDI_ABOUT_ME_URL . '/dist/' . CacheBust::name('js/gdi-modularity-about-me.css'), + null ); } }