From f09077c0772041de617c87eb452c534a244918b8 Mon Sep 17 00:00:00 2001 From: Shivendra Date: Wed, 13 Mar 2024 14:53:15 +0530 Subject: [PATCH] Fixed build issue --- docs/.vuepress/theme/layouts/404.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/theme/layouts/404.vue b/docs/.vuepress/theme/layouts/404.vue index f1ad81065..35cd130ad 100644 --- a/docs/.vuepress/theme/layouts/404.vue +++ b/docs/.vuepress/theme/layouts/404.vue @@ -36,14 +36,17 @@ import configurations from '../../config'; export default { data() { return { - currentURL: window.location.href, + currentURL: '', availableURLs: [], } }, mounted() { - this.findSimilarPaths(`/${this.currentURL.split('/')[3]}/`, this.currentURL.split('/')[4]); + if (typeof window !== 'undefined') { + this.currentURL = window.location.href; + this.findSimilarPaths(`/${this.currentURL.split('/')[3]}/`, this.currentURL.split('/')[4]); + } }, methods: {