Adjust 'internalPageMixins'

This commit is contained in:
Wolfgang Huß 2022-10-28 12:06:16 +02:00
parent f5f3fbeadb
commit b45545decf

View File

@ -16,10 +16,7 @@ export function internalPageMixins(pageParams) {
},
created() {
if (!this.pageParams.isInternalPage) {
// to avoid possible errors, because 'window' is only defined on browser side but not in NodeJS on client side. check for 'typeof window' is neccessary, because if it's not defined at all you can't check for 'window !== undefined' without the same error 'window is undefined'
if (typeof window !== 'undefined') {
window.location.href = this.pageParams.externalLink
}
this.pageParams.redirectToPage(this)
}
},
}