From aad1beefc089fe5730ac13c8eafa691c8f7bf9fd Mon Sep 17 00:00:00 2001 From: Inian Parameshwaran Date: Thu, 3 Dec 2020 16:09:22 +0800 Subject: [PATCH] handle reference error --- web/src/pages/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/src/pages/index.js b/web/src/pages/index.js index 4c8cf8a9551..e826c5f5ac7 100755 --- a/web/src/pages/index.js +++ b/web/src/pages/index.js @@ -604,9 +604,12 @@ function Home() { // export default Home export default () => { - if (typeof window !== 'undefined' && window.location.href.indexOf('localhost') === -1) { - window.location.replace('https://supabase.io') - } else { - window.location.replace('/docs') + if (typeof window !== 'undefined') { + if (window.location.href.indexOf('localhost') === -1) { + window.location.replace('https://supabase.io') + } else { + window.location.replace('/docs') + } } + return null }