mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-08-11 03:12:47 +02:00
fix: limit redirects to browser context
Build breaks because there is no window during server build
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user