fix: limit redirects to browser context

Build breaks because there is no window during server build
This commit is contained in:
Marcin Rataj
2022-08-16 00:51:05 +02:00
parent bad1358c8c
commit c18782b7aa
+3
View File
@@ -10,6 +10,9 @@
export default {
name: 'Layout',
beforeCreate() {
if (!process.browser) {
return;
}
// redirect blog.ipfs.io → blog.ipfs.tech (incl. gateways)
// https://github.com/ipfs/ipfs-blog/issues/417
const { href } = window.location