diff --git a/includes/init.php b/includes/init.php index bed60f2..d4e718f 100644 --- a/includes/init.php +++ b/includes/init.php @@ -68,7 +68,7 @@ function tailpress_enqueue_scripts() 'yes' => __('Oui', 'homegrade-theme__texte-fonctionnel'), 'no' => __('Non', 'homegrade-theme__texte-fonctionnel'), 'template_directory_uri' => get_template_directory_uri(), - 'current_thematique' => get_the_terms(get_the_ID(), 'thematiques')[0], + 'current_thematique' => get_the_terms(get_the_ID(), 'thematiques')[0] ?? null, ); wp_localize_script('main-app-js', 'mainAppJsDynamicDatas', $main_app_js_dynamic_datas);