Skip to content

Commit

Permalink
fix(vue-app): call ssrContext.unsetMutationObserver only if it exists (
Browse files Browse the repository at this point in the history
…#10132)

[release]
  • Loading branch information
reegodev committed Dec 17, 2021
1 parent c1d02ea commit 777a4b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vue-app/template/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ export default async (ssrContext) => {

<% if (isFullStatic && store) { %>
// Stop recording store mutations
ssrContext.unsetMutationObserver()
// unsetMutationObserver is only set after all router middleware are evaluated
if (ssrContext.unsetMutationObserver) {
ssrContext.unsetMutationObserver()
}
<% } %>
}
}
Expand Down

0 comments on commit 777a4b7

Please sign in to comment.