Skip to content

Commit

Permalink
fix: make pinia work with nuxt Composition API plugin (#180)
Browse files Browse the repository at this point in the history
closes #179
  • Loading branch information
danielroe authored Jun 23, 2020
1 parent bc2f049 commit f4e2583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ssrPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const PiniaSsr = (vue: VueConstructor) => {
// @ts-ignore
this.$options.setup = (props: any, context: SetupContext) => {
// @ts-ignore
setActiveReq(context.ssrContext.req)
if (context.ssrContext) setActiveReq(context.ssrContext.req)
return setup(props, context)
}
}
Expand Down

0 comments on commit f4e2583

Please sign in to comment.