Skip to content

Commit 777a4b7

Browse files
authored
fix(vue-app): call ssrContext.unsetMutationObserver only if it exists (#10132)
[release]
1 parent c1d02ea commit 777a4b7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/vue-app/template/server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export default async (ssrContext) => {
134134

135135
<% if (isFullStatic && store) { %>
136136
// Stop recording store mutations
137-
ssrContext.unsetMutationObserver()
137+
// unsetMutationObserver is only set after all router middleware are evaluated
138+
if (ssrContext.unsetMutationObserver) {
139+
ssrContext.unsetMutationObserver()
140+
}
138141
<% } %>
139142
}
140143
}

0 commit comments

Comments
 (0)