fix: update nuxt-graphql and extractNodes typing (maybe => undefined instead of null)
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify-json/lucide": "^1.2.87",
|
"@iconify-json/lucide": "^1.2.87",
|
||||||
"@lewebsimple/nuxt-graphql": "^0.6.1",
|
"@lewebsimple/nuxt-graphql": "^0.6.6",
|
||||||
"@nuxt/ui": "4.3.0",
|
"@nuxt/ui": "4.3.0",
|
||||||
"@nuxtjs/device": "4.0.0",
|
"@nuxtjs/device": "4.0.0",
|
||||||
"@nuxtjs/seo": "^3.4.0",
|
"@nuxtjs/seo": "^3.4.0",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
|
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
|
||||||
export function extractNodes<T>(connection: { nodes?: readonly T[] } | null | undefined): readonly T[] {
|
export function extractNodes<T>(connection: { nodes?: T[] } | undefined): T[] {
|
||||||
return connection?.nodes ?? [];
|
return connection?.nodes ?? [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user