Skip to content

Commit

Permalink
fix(nuxt): avoid hot reload error
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jul 27, 2020
1 parent 70f1c31 commit d47e46d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nuxt/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export default (ctx, inject) => {
return wrappedFn(
/** @type {import('../src').MandeInstance} */
(api) => {
// the plugin can be called during dev in client side with no context
if (!ctx.req) return

const reqHeaders = { ...ctx.req.headers }

// @ts-ignore
Expand Down

0 comments on commit d47e46d

Please sign in to comment.