mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt3): allow attrs to be included in head tags (#1959)
This commit is contained in:
parent
6d94158e95
commit
49179d2d8d
@ -8,7 +8,7 @@ const removeUndefinedProps = (props: Props) =>
|
||||
Object.fromEntries(Object.entries(props).filter(([_key, value]) => value !== undefined))
|
||||
|
||||
const setupForUseMeta = (metaFactory: (props: Props, ctx: SetupContext) => Record<string, any>, renderChild?: boolean) => (props: Props, ctx: SetupContext) => {
|
||||
useMeta(() => metaFactory(removeUndefinedProps(props), ctx))
|
||||
useMeta(() => metaFactory({ ...removeUndefinedProps(props), ...ctx.attrs }, ctx))
|
||||
return () => renderChild ? ctx.slots.default?.() : null
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user