Skip to content

Commit

Permalink
Merge pull request #883 from dpc-sdp/bugfix/R20-1560-patch
Browse files Browse the repository at this point in the history
fix(@dpc-sdp/nuxt-ripple): fixed console error when request event was…
  • Loading branch information
dylankelly authored Oct 6, 2023
2 parents 6676376 + b8f9431 commit 5db7e84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nuxt-ripple/composables/use-merge-section-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ const mergeTags = (existingTags: string, newTags: string): string => {
export const useMergeSectionTags = async (
sectionCacheTags: any
): Promise<void> => {
// event will be undefined if the request is on the client side
const event = useRequestEvent()

// Section.io cache tags must be set on the response header to invalidate the cache after a change in drupal
if (sectionCacheTags) {
if (event && sectionCacheTags) {
const currentResponseHeaders = getResponseHeaders(event)

const currentSectionTags: string =
Expand Down

0 comments on commit 5db7e84

Please sign in to comment.