Closed pixelastronauts closed 8 months ago
appConfig.nuxtIcon
object. This updated approach helps in ensuring these properties exist before trying to access them, preventing possible errors which could occur if certain properties are unavailable.I've had this problem too and I think you're right.
Thanks, going to merge this as it's blocking me as well.
Edit: Turns out I can't publish releases for nuxt-icon so will need to wait for @Atinux or someone else to bump
Sorry about this, just released as 0.6.1
Resolves #100
Problem
While accessing properties of
nuxtIcon
, the application would throw aTypeError
ifnuxtIcon
was undefined.Solution
Added optional chaining (
?.
) to safely access the nested properties ofnuxtIcon
.Changes
nuxtIcon
before trying to access itsaliases
property.