File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
runtime/composables/useDrupalCe Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default defineNuxtModule<ModuleOptions>({
2626 name : 'nuxtjs-drupal-ce' ,
2727 configKey : 'drupalCe' ,
2828 compatibility : {
29- nuxt : '^3.2.2 ' ,
29+ nuxt : '^3.7.0 ' ,
3030 } ,
3131 } ,
3232 defaults : {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export const useDrupalCe = () => {
6565 const useCeApi = ( path : string | Ref < string > , fetchOptions : UseFetchOptions < any > = { } , doPassThroughHeaders ?: boolean ) : Promise < any > => {
6666 const nuxtApp = useNuxtApp ( )
6767 fetchOptions . onResponse = ( context ) => {
68- if ( doPassThroughHeaders && privateConfig . passThroughHeaders && import . meta . server ) {
68+ if ( doPassThroughHeaders && import . meta . server && privateConfig ?. passThroughHeaders ) {
6969 const headersObject = Object . fromEntries ( [ ...context . response . headers . entries ( ) ] )
7070 passThroughHeaders ( nuxtApp , headersObject )
7171 }
@@ -221,7 +221,7 @@ export const useDrupalCe = () => {
221221 const event = nuxtApp . ssrContext . event
222222 if ( pageHeaders ) {
223223 Object . keys ( pageHeaders ) . forEach ( ( key ) => {
224- if ( privateConfig . passThroughHeaders . includes ( key ) ) {
224+ if ( privateConfig ? .passThroughHeaders . includes ( key ) ) {
225225 appendResponseHeader ( event , key , pageHeaders [ key ] )
226226 }
227227 } )
You can’t perform that action at this time.
0 commit comments