Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
selimb authored and tlhunter committed Mar 1, 2023
1 parent 6495810 commit 86e57b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/datadog-instrumentations/src/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ function wrapHandleApiRequest (handleApiRequest) {
return promise.then(handled => {
if (!handled) return handled

const page = getPageFromPath(pathname, this.dynamicRoutes)
return this.hasPage(pathname).then(pageFound => {
const page = pageFound ? pathname : getPageFromPath(pathname, this.dynamicRoutes)

pageLoadChannel.publish({ page })
pageLoadChannel.publish({ page })

return handled
return handled
})
})
})
}
Expand Down

0 comments on commit 86e57b8

Please sign in to comment.