fix(vue-app): call ssrContext.unsetMutationObserver only if it exists (#10132)

[release]
This commit is contained in:
Matteo Rigon 2021-12-17 14:20:07 +01:00 committed by GitHub
parent c1d02ea353
commit 777a4b7f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
}
<% } %>
}
}