Replace the pre-evaluated isServer check with a direct typeof window === 'undefined' check to properly handle test scenarios where window is stubbed after module load. Co-authored-by: lyzno1 <[email protected]>