Skip to content

Commit fc45f79

Browse files
author
Рома Столбов
committed
Add compatibility with Nuxt 4
1 parent 259e449 commit fc45f79

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuxt-font-loader",
3-
"version": "2.3.5",
3+
"version": "2.3.6",
44
"description": "Simple, modern and lightweight font loader for Nuxt.",
55
"author": "Ivo Dolenc",
66
"license": "MIT",

src/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineNuxtModule<ModuleOptions>({
5959
}
6060
}
6161

62-
head.style?.push({ children: styles })
62+
head.style?.push(styles)
6363
}
6464

6565
if (external) {
@@ -111,7 +111,7 @@ export default defineNuxtModule<ModuleOptions>({
111111
)
112112
}
113113

114-
if (styles) head.style?.push({ children: styles })
114+
if (styles) head.style?.push(styles)
115115
}
116116
},
117117
})

src/runtime/composables/use-external-font.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ export const useExternalFont = (external: ExternalOptions[]) => {
5454

5555
useHead({ link: links })
5656

57-
if (styles) return useHead({ style: [{ children: styles }] })
57+
if (styles) return useHead({ style: [styles] })
5858
}

src/runtime/composables/use-local-font.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ export const useLocalFont = (local: LocalOptions[]) => {
3131

3232
if (links.length) useHead({ link: links })
3333

34-
return useHead({ style: [{ children: styles }] })
34+
return useHead({ style: [styles] })
3535
}

0 commit comments

Comments
 (0)