Skip to content

Commit 5f02f88

Browse files
committed
fix: 🐛 corrige le crash de nuxt sans vueDsfr.icons
- Ajoute une vérification pour éviter le crash de nuxt si `runtimeConfig.public.vueDsfr.icons` n'est pas défini dans le fichier `nuxt.config.js`
1 parent 1d7d8b0 commit 5f02f88

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-dsfr-nuxt-module",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Module Nuxt 3 pour VueDsfr",
55
"repository": {
66
"type": "git",

‎src/runtime/plugin.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineNuxtPlugin((nuxtApp) => {
77

88
//#region Handle oh-vue-icons
99
// Get the icons option from the runtime config
10-
const userIcons: Record<string, IconType> | IconType[] | undefined = options.public.vueDsfr.icons
10+
const userIcons: Record<string, IconType> | IconType[] | undefined = options.public?.vueDsfr?.icons
1111
// If the icons option is not set, do nothing
1212
if (!userIcons) {
1313
return

0 commit comments

Comments
 (0)