Open stephanNrich opened 1 year ago
Hi, use this snippet before your main render and return if the env is not browser:
if (typeof window !== 'undefined' || !!process?.browser) return null
if (typeof document === 'undefined' || typeof window === 'undefined' || !!process?.browser) return null
I'm getting same error after adding this to the component it os not rendering anything. any workaround?
Hey I'm using this library in Nextjs, i've tried to use {typeof window !== undefined} but still getting an error that Document is not defined, any suggestions ?