Skip to content

Commit

Permalink
fix(icon): use optional chaining to fix 'undefined' error in Histoire (
Browse files Browse the repository at this point in the history
  • Loading branch information
tkjaergaard authored Jul 30, 2024
1 parent cbf364f commit a64428c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/components/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const NuxtIconCss = /* @__PURE__ */ defineComponent({
const icon = _getIcon(name)
if (icon)
return icon
const payload = nuxt.payload.data[name]
const payload = nuxt.payload?.data?.[name]
if (payload) {
addIcon(name, payload)
return payload
Expand Down

0 comments on commit a64428c

Please sign in to comment.